Originally Posted by LiteC Syntax
type name = value;
type name = { ... }

; Semicolon terminates each instruction or logical line.
{...} Winged brackets enclose structs or instruction lists.

Is there any way to force compiler to accept ';' at the end of the instruction lists?
So it would be:
Code
type name = { ... };
instead of:
Code
type name = { ... }
This would fix a lot of issues that LiteC has with all C/C++ IDE's. Because all C parsers in this case expect the end of the line (;).

Code examples:
Code
ENTITY *ent =
{
    layer = 1;
};

PANEL *pan =
{
    layer = 1;
};

VECTOR *vSpeed =
{
    x = 10;
    y = 20;
    z = 30;
};

ANGLE *aSpeed =
{
    pan = 10;
    tilt = 20;
    roll = 30;
};
Instead of weird
Code
ENTITY *ent =
{
    layer = 1;
}

PANEL *pan =
{
    layer = 1;
}

VECTOR *vSpeed =
{
    x = 10;
    y = 20;
    z = 30;
}

ANGLE *aSpeed =
{
    pan = 10;
    tilt = 20;
    roll = 30;
}


EDIT: I've faced this syntax problem with VSCode in the past, now I'm facing it while getting Geany to work with LiteC.

C parser can't parse this... it goes all the way down till ';' is found at the end of ENTITY* ent_ptr !
[Linked Image]

But it works correctly when everything is closed with ';'
[Linked Image]


Best regards

Last edited by 3run; 07/28/21 10:16.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung