Closed antoniom closed 1 year ago
I'm in the process of renaming certain properties to their canonical TypeScript form. Particularly those with a leading (and sometimes trailing) underscore strike me odd every time I see them. antlr4ts also contains a few renames, but does not go the full way.
What I renamed so far are:
_input
became inputStream
_errHandler
became errorHandler
_interp
became interpreter
Didn't notice inputStream
, thanks!
@mike-lischke It seems like Lexer is missing _mode (and other fields that should be public per ANTLR4 java docs)
Right, many things are missing. I'm on the way to fix all that (see the effort in the ts-migration branch). Haven't come to Lexer
yet, though.
My grammar uses a semantic predicate
Moving from antlr4's "native" Javascript runtime to antlr4ng Typescript runtime I noticed that the generated Lexer is complaining because
this._input
does not exist.By looking at
Lexer.d.ts
I figured out that the property is not included, was this intentional?Moreover, I have noticed that
_input
is also stored in a_tokenFactorySourcePair
tuple. Can i use_tokenFactorySourcePair[1]
to obtain my_input
?