bates64 / vscode-star-rod

Star Rod language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=nanaian.vscode-star-rod
MIT License
7 stars 2 forks source link

v1.6.1: databaseParser fails to detect library scopes (SR 0.4.2 & 0.4.4) #12

Closed icebound777 closed 2 years ago

icebound777 commented 2 years ago

Failed to read database file [...]/battle_func_library.lib: Unknown scope: undefined

... as well the other 4 func_libraries

Probable cause: /src/databaseParser.ts line 150 accesses non-existing array index for scope string battle formerly tokenized from {scope=battle} line in library file

see https://github.com/nanaian/vscode-star-rod/blob/d5ca63ee6e64db82e470f7759b7f83711fa1c9be/src/databaseParser.ts#L150

bates64 commented 2 years ago

Ah, this is a result of a syntax change between 0.4.x and 0.5.x:

-{scope=battle}
+{scope=us:battle}
bates64 commented 2 years ago

This bug introduced in f134bef

bates64 commented 2 years ago

A fix should be available in vscode-star-rod 1.6.2, let me know if it's still broken