How to do the conversion from TextMate grammar? #475
-
I saw your comment on #402 (comment) and I have read the newly added lbstanza.cpp. I want to know how to convert stanza.tmLanguage.json to lbstanza.cpp. Is there an automated tool? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 13 replies
-
With the usual tool, as I said ecode now understands TextMate grammars: This step is not needed at all, conversion to C++ is done to integrate the grammar into ecode build (and to load it faster), you don't need to do that. Just put your grammar into the languages folder, it will overwrite any existing grammar if the grammar already exists in the ecode build. |
Beta Was this translation helpful? Give feedback.
-
And this becomes a mess now. I don't even know which dialect of syntax highlighting rules is being used in .cpp files. The Lua patterns one is easy to spot. But Lua patterns mixed with RegEx and TextMate grammar (also full of RegEx) are almost the same. |
Beta Was this translation helpful? Give feedback.
-
Another side effect is no one will continue to write in the Lua patterns one anymore. TextMate is superior and more portable. |
Beta Was this translation helpful? Give feedback.
-
If I have both the Lua patterns one ( |
Beta Was this translation helpful? Give feedback.
-
Is VSCode's For example: https://github.com/covscript/covscript-vscode/blob/master/language-configuration.json |
Beta Was this translation helpful? Give feedback.
-
The TextMate grammar file name is not https://github.com/covscript/covscript-vscode/blob/master/syntaxes/covscript.cson.json |
Beta Was this translation helpful? Give feedback.
-
Quoted your comment on #402 (comment):
It seems the file extensions are covered in For example: https://github.com/objeck/objeck-lang/blob/master/docs/syntax/vscode/package.json |
Beta Was this translation helpful? Give feedback.
-
https://github.com/objeck/objeck-lang/blob/master/docs/syntax/vscode/syntaxes/objeck.tmLanguage.json |
Beta Was this translation helpful? Give feedback.
With the usual tool, as I said ecode now understands TextMate grammars:
ecode --convert-lang-path=/path/to/grammar.tmLanguage.json --convert-lang-output=/output/path/
This step is not needed at all, conversion to C++ is done to integrate the grammar into ecode build (and to load it faster), you don't need to do that. Just put your grammar into the languages folder, it will overwrite any existing grammar if the grammar already exists in the ecode build.