antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
16.68k stars 3.23k forks source link

Missing TypeScript methods #4592

Open kaby76 opened 2 months ago

kaby76 commented 2 months ago

There are missing methods for lexer commends, like setChannel(). Some of the set/get methods, which are in Java, are inconsistent in TypeScirpt. For example, _type in TypeScript is a public field, whereas in Java there are get and set methods to hide direct access.

Also, I wonder about text in TypeScript vs _text in JavaScript, whereas in setText() in Java sets _text. There is no this.text in the JS code.

I am writing a table of the API presented across all targets. This should help clarify what is missing. The fields in the lexer object are used when calling emit().