Open danielkleinert opened 1 month ago
Hm, I can make this work by generating the files without the rollup plug-in defining a .ts output file for the cli:
lezer-generator syntax.grammar -o syntax.ts
Maybe the rollup plug-in could provide the .d.ts files to make this work? (syntax.grammar.terms.d.ts and syntax.grammar.d.ts)
If you can figure out how that would work in the Rollup plugin (and it's not too much of a mess to implement), I'd be open to adding support for this.
Is there a way to get the term names as TS string union type? This would allow me to ensure that I don't assign syntax highlighting for nodes that aren't in the grammar any more or when checking the types while traversing the tree and so on.
So basically this, but in working: