I’m building a syntax plugin to support scripting for a game that uses a custom domain-specific language. The language doesn’t allow to create your own functions and classes, but instead provides a fixed (only partially documented) amount of functions, of several hundreds.
Now while building the syntax,I came up with a “clever trick” (probably not). have every non-whitespace token that is not captured by the conventional categories of the already developed syntax as invalid.illegal
, and add that only that scope to the global symbol list. This way, I can use the global symbol list (i.e. ctrl + shift + r
) as an error-checker of sorts without having to manually open every script file in the game folder.
My problem is, I can’t seem to predict when or how is the list populated, so for example, I spor an error in the syntax, fix the syntax, the script is no longer scoped as invalid, but still is shown in the symbol list. Sometimes, closing and reopening the project fixes this, but more often than not, closing and reopening means the list is depopulated and when repoening it is only populated with from the opened files.
So, is there a known behaviour of how and when is the global list updated? Ideally, I’d like to make the end users of my plugin be able to use (a refined version of) my “trick” to be able to catch the most harmfull syntax error that way