Support for custom SQL-extending grammar
I'd like to write a plugin for supporting SQL-extending grammar. I thought about implementing custom annotator but can't specify language SQL in plugin.xml. Started to implement custom language support, describes new keywords in bnf but do not want to describe SQL syntax. What do you advise?
Please sign in to leave a comment.
What language do you work on?
We have a custom tool for applying and reverting migrations. SQL script surrounds with some meta information about migration. Also, there are a few new shortcuts for replacing SQL boilerplate. The tool that can parse and execute this scripts.
It may looks like:
I follow the instructions to support syntax but do not know how to work with SQL inside migration. And is there any way to expand SQL syntax with new words.
I'd try to implement a separate template language instead
see com.intellij.psi.templateLanguages.TemplateLanguage API
Could you please provide any examples or links to documentation
No docs unfortunately.
I've found some 3rd-party implementations on github:
https://github.com/Camelcade/Perl5-IDEA/blob/master/src/com/perl5/lang/tt2/TemplateToolkitLanguage.java
https://github.com/KronicDeth/intellij-elixir/blob/master/src/org/elixir_lang/eex/Language.java
https://github.com/jhsx/GoJetPlugin/blob/master/src/io/github/jhsx/jet/JetLanguage.java
Thanks a lot