All notable changes to the "gsc" extension will be documented in this file.
The format is based on Keep a Changelog
- Added definition provider and hover provider for GSC paths
- Added reference provider for GSC function definitions
- Added: When GSC file is replaced by another GSC file in multi-root workspace because of the same game path (e.g. maps\mp\gametypes\script), the code in text editor is shown as semi-transparent (unreachable code)
- Added rename provider that supports GSC function rename
- Added GSC side panel with "Workspace", "File" and "Other" views. It shows information about workspace setup, parsed GSC files and available commands to run.
- Added new Output window "GSC File Logs" to diagnose changes to file system.
- Improved detection of GSC file and folder changes, moving, renaming, etc...
- Improved Issues, cached exception now appears in status bar, source code is included into report
- Improved GSC file references when two or more workspace folders are referenced for each other. When there are 2 workspaces where in each there is one file with the same "game" path (e.q. maps\mp\gametypes\script.gsc), only the last file is used (according to the workspace folder order in explorer). It applies for function and variable definitions in hover provider, auto-completion etc.
- Changed function precedence for universal game to prioritize local functions, then included functions, then built-in functions; if a function is defined multiple times, the first one found is used and others are ignored without error - unlike CoD2, where duplicate function names in local or included files cause an error.
- Change: the extension activate function now does not wait for all GSC files to be parsed
- Fixed error "'range' cannot span multiple lines" - when typing file path in GSC file.
- Fixed a bug where the status bar item was not displayed when parsing all files again
- Fixed LoggerOutput to show local time in logs instead of ISO time
- Fixed diagnostic errors for GSC file references on Linux systems
- Fixed hover and go to definition not working when cursor is right at start of the function name / keyword
- Fixed CoD2 function 'getBrushModelCenter(entity)' - missing argument
- 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 -> { }
- Added support for "foreach"
- Added error diagnostic if a file is included by itself via #include. Now it also does not consider - functions to be duplicated.
- Added error diagnostics if file is included twice or more via #include
- Improved debugging window of parsed files to show parsed data of selected range of text
- Improved tests so a few lines of source code is printed for all files in error stack for tests
- Fixed Github Actions .yml file - manual triggering allowed and if conditions wrapped into ${{ }}
- Fixed errors for file references on Linux systems
- Fixed unnecessary file parsing
- Improved exceptions handling
- Improved logging data into 'Output' tab
- Improved internal notifying of GscFiles
- Improved internal storage of diagnostics for files
- Updated README with list of all CoD games and their support status
- Fixed file path separator on linux system for GSC file path references
- Added CI for Github Actions (automated integration tests)
- Dependencies updated
- Auto-suggestion for variables 'level' and 'game' now take included workspace folder into account
- Improved caching of parsed files
- Changed the order of how files are being searched in workspace when they get referenced - its sorted by how the workspace folder appears in explorer tab, the last folder is searched first
- Added error diagnostic for #include
- Added new debugging window to inspect the files
- Added log window into Output Channels
- Fixed missing file ./src/Updates.html in package
- Fixed missing package 'semver'
- Added ability to include workspace folders for external GSC files references
- Added local and included functions into auto-suggestion
- Added settings to disable error diagnostics
- Improved hover over local functions
- Improved update change log popup window
- Fixed code action "Change game root folder to xxx" - it suggested folders from different workspace folders + it was able to use file instead of folder
- Fixed re-diagnosing files when file is moved to another folder
- Fixed automatic extension activation on startup - now the extension is activated when some GSC file is opened
- Fixed error message appearing when new folder is added into multi-root workspace
- Fixed error message appearing when new folder is created in workspace
- Added code action "Change game root folder to 'xxx'" - it will automatically detects if files are in deeper folder structure
- Fixed quick fix option "Ignore file xxx (workspace settings)"
- Updated all packages
- Fixed images in update notification window
- Added settings - game selection, game root folder, ignored file paths, ignored function names
- Added option in status bar to switch the game
- Added support for CoD2 MP + SP
- Added CoD2 MP + SP function definitions for auto-suggestion, hover a parameters error diagnostics
- Added warning message when build-in function is overwritten by local function
- Added code action provider to easily add file path into ignored list
- Added yellow status bar information indicating parsing and diagnosing tasks in background
- Added issue manual reporting
- Fixed case-sensitivity for file paths and function names
- Fixed structure & array auto-suggestion when written after keyword (e.g. 'wait level.xxx')
- Fixed re-diagnosing files when renamed, deleted or workspace folder changed
- Fixed handling GSC files outside of the workspace
- Improved hover-over function names (colorization, warnings, case insensitive match)
- Fixed hover-over function name case-sensitive error (functions are case insensitive)
- Fixed parsing error when double-quote does not have ending pair (a = "string;)
- Improved error reporting of unexpected tokens / missing semicolon
- Added syntax support for casting (used in COD1)
- Fixed stack overflow error while parsing large files (caused by ...spread operator + recursive functions)
- Fixed developer block /##/ which can be used as regular scope
- New GSC parser
- New analyzer
- New completion item provider
- New diagnostics provider
- New semantics provider
- New definition provider
- New hover provider
- Added "HoverProvider" and "DefinitionProvider" that works with functions-
- Improved gsc syntax highlighting
- Changed from "New Language Support" to "New Extension (TypeScript)" in 'yo code' template
- Basic syntax highlights of .gsc files
- Initial release