I want to build a mixed language around
@codemirror/lang-sql but it doesn’t look like the lezer parser is exposed, which I believe I need in order to use it as the outer language and configure inner languages underneath it.
Is this possible, or is there a better pattern I should be following?
Language object in the CodeMirror interface has a
parser property holding the Lezer parser object.
But don’t I need a
LRParser which has the
configure(config: ParserConfig): LRParser; property? Based on the example here CodeMirror Mixed-Language Parsing Example
Ah ok I see for the
lang-sql package, at least, I can access the
LRParser via the
StandardSQL.language.parser – is that what you’d recommend?
If you have an
parser property will be an
LRParser. In the SQL package,
SQLDialect.language.parser is the way to get to that, yes.