SQFvm / runtime

Custom implementation of the Arma script language SQF
GNU Lesser General Public License v3.0
98 stars 30 forks source link

[BUG] Config parser - Unexpected errors with GUI controls array #129

Closed Coryf88 closed 3 years ago

Coryf88 commented 4 years ago

Describe the bug The config parser errors when parsing a GUI's controls[].

To Reproduce

  1. Create file test.cpp, containing:
    class My_Dialog {
    controls[] = { My_Text_1 };
    class My_Text_1 {};
    };
  2. Execute sqfvm.exe --parse-only --input-config test.cpp
  3. See errors:
    [ERR] [L2|C16|file]      Missing curly closing bracket (`}`).
    [ERR] [L2|C16|file]      Expected Statement termination using `;`.
    [ERR] [L2|C26|file]      Missing equal sign (`=`).

Expected behavior No error.

Screenshots N/A

Additional context N/A

X39 commented 4 years ago

This is related to the poor handling of broken config strings. Due to lack of proper "definitive" way of parsing configs, this is currently a Won't Fix. It might be fixed with a rewrite of the config parser, that handles the value-side of tokens with a separate parser.

X39 commented 3 years ago

Might be fixed with #156