Skip to content

Version 0.2.0

Choose a tag to compare

@eyza-cod2 eyza-cod2 released this 01 Oct 18:26
· 39 commits to master since this release

Version [0.2.0] - 2024-10-01

Added support for global variable definitions (CONST_VAR1 = 1;)

Added support for array initializers, like "arr = [10, 20, 30]"

Added support for conditional ternary operators (var = a ? b : c)

Added support for do {} while ();

Added list of supported GSC features for each game.

Universal game supports everything.
For example CoD2 does not support foreach, do-while, array initializer, global variables, ternary, recursive developer blocks, etc. When not supported, error diagnostics is shown.

Improved missing semicolon error indication

The red underline is visible only at the end of the statement where the semicolon should be placed

Improved missing semicolon detection

By verifying if (object + function call) and (variable + structure accessor) are on single line

All changes:

  • Added support for global variable definitions (CONST_VAR1 = 1;)
  • Added support for array initializers, like "arr = [10, 20, 30]"
  • Added support for conditional ternary operators (var = a ? b : c)
  • Added support for do {} while ();
  • Added list of supported GSC features for each game. Universal game supports everything. For example CoD2 does not support foreach, do-while, array initializer, global variables, ternary, recursive developer blocks, etc. When not supported, error diagnostics is shown.
  • Improved missing semicolon error indication - now the red underline is visible only at the end of the statement where the semicolon should be placed
  • Improved missing semicolon detection by verifying if variable + structure accessor, object + function call are on single line
  • Improved error diagnostics for 'if', 'else', 'for', 'while', 'do' when inline statement is used instead of scope (single-line scope) and there is some error in that inline statement. (for example "if (true) some error here;" would no longer consider "if (true)" as bad syntax)
  • Improved exception messages when parsing GSC files.
  • Fixed correct update of currently selected game in status bar when manually changed
  • Fixed foreach with function call in array parameter -> "foreach(v in getArray())" -> 'in' keyword was recognized as variable name
  • Fixed 'for' with function call in condition statement -> "for (i = 1; self isOk(); i++)"
  • Fixed double negations -> "var1 = !!true;"
  • Fixed no error detected when foreach expression is empty -> foreach() {}
  • Fixed error for unclosed scope bracket -> { }