tunnelvisionlabs/antlr4ts

Code release produced a wrong typings file.

mike-lischke opened this issue · 1 comments

I haven't looked at the details of antlr4ts for a while already, so I don't know when this was introduced, but currently (0.5.0-alpha.3) there's a bug in ParserInterpreter.d.ts which causes a crash in my grammer debugger. Line 64 reads:

protected rootContext: InterpreterRuleContext;

which is probably as it has been before. Later (4.5.1) a line was added:

readonly rootContext: InterpreterRuleContext;

in the same file, about which ESLint actually complains (both members must have the same signature). My grammar debugger writes to the rootContext which ended up on the newly added readonly member (and caused an exception as this is not writable).

The fix is to define the writable member as:

protected _rootContext: InterpreterRuleContext;

which I now use to set the new context content and everything is back to work normally.

Fixed in -alpha.4