Re: ManiaScript for Visual Studio Code
Posted: 23 Mar 2017, 23:50
I had a bit of a look through your language repo and have some suggestions I don't want to make pull requests for:
Please support CDATA sections in themplate strings as well as XML comments.
The latter tend to create malformed XML with ManiaScript.
And the $< $> around these placeholders in strings are optional. They are common to avoid broken formatting, but not necessary.
Operators:
MS doesn't have bitwise operators yet as far as I know and no ++/-- so these shouldn't be highlighted.
Also there is the keyword is as instanceof (or comparable operators).
Keywords:
switchtype is a thing (like switch, case values are class identifiers). I saw you have a switch-literal thing. I don't know what it is used for, but maybe you want to extend this (as for these *-literal files: we don't need regex, but maybe foreach and while - idk).
assert() is a basic function like log() and might want to be highlighted equally.
Just a bit ago I stumbled across #Command (https://github.com/maniaplanet/game-mod ... pt.txt#L37)
try/catch/finally/throw are no keywords in MS either to my knowledge.
persistent/netread/netwrite are keywords in context of variable declaration (declare ... <Type> <Identifier> for <Identifier>).
This is a keyword.
Labels:
Labels can be ---Label--- as well. (I didn't see it in language-label, but my color scheme doesn't really highlight operators at all, so actually some of my remarks might be off. In that case sorry for that.)
Oh and while you stated that you forked this thing off of my tmLanguage file: I merely updated this whole struct and property list (at that time poorly) generating it from the MS docs. Thus the list is not complete and I didn't bother too much with the stuff I now mentioned above.
I now have an updated (unpublished) script to generate these data from the doxygen XML (enums, structs, public members, namespaces - mostly including descriptions etc.). I tried generating VS Code snippets like sublime-completions, but they aren't quite comparable and thus not completely useful.
As you built your tmLanguage generation with js though, you would probably do these things with a node script as well.
Finally out of curiosity: how do you plan to support intellisense? From what I read so far this requires a bit more work on actually parsing etc. the script?
greetz
Please support CDATA sections in themplate strings as well as XML comments.
The latter tend to create malformed XML with ManiaScript.
And the $< $> around these placeholders in strings are optional. They are common to avoid broken formatting, but not necessary.
Operators:
MS doesn't have bitwise operators yet as far as I know and no ++/-- so these shouldn't be highlighted.
Also there is the keyword is as instanceof (or comparable operators).
Keywords:
switchtype is a thing (like switch, case values are class identifiers). I saw you have a switch-literal thing. I don't know what it is used for, but maybe you want to extend this (as for these *-literal files: we don't need regex, but maybe foreach and while - idk).
assert() is a basic function like log() and might want to be highlighted equally.
Just a bit ago I stumbled across #Command (https://github.com/maniaplanet/game-mod ... pt.txt#L37)
try/catch/finally/throw are no keywords in MS either to my knowledge.
persistent/netread/netwrite are keywords in context of variable declaration (declare ... <Type> <Identifier> for <Identifier>).
This is a keyword.
Labels:
Labels can be ---Label--- as well. (I didn't see it in language-label, but my color scheme doesn't really highlight operators at all, so actually some of my remarks might be off. In that case sorry for that.)
Oh and while you stated that you forked this thing off of my tmLanguage file: I merely updated this whole struct and property list (at that time poorly) generating it from the MS docs. Thus the list is not complete and I didn't bother too much with the stuff I now mentioned above.
I now have an updated (unpublished) script to generate these data from the doxygen XML (enums, structs, public members, namespaces - mostly including descriptions etc.). I tried generating VS Code snippets like sublime-completions, but they aren't quite comparable and thus not completely useful.
As you built your tmLanguage generation with js though, you would probably do these things with a node script as well.
Finally out of curiosity: how do you plan to support intellisense? From what I read so far this requires a bit more work on actually parsing etc. the script?
greetz