antlr4: TypeScript missing critical class definition exports
I was trying to write a template for TypeScript for testing the new target on grammars-v4. There is (are) important classes that need to be exported. Otherwise, I am blocked, and there will be no testing of the target in grammars-v4 because the trgen templates require a consistent runtime API in order to provide consistent functionality across targets.
- Recognizer missing in export list. https://github.com/antlr/antlr4/blob/c2bfa34a66e6449ff6fb2e388e17e2ff4b7e8e82/runtime/JavaScript/src/antlr4/index.d.ts#L10
- List not sorted alphabetically for quick lookup for missing exports. https://github.com/antlr/antlr4/blob/c2bfa34a66e6449ff6fb2e388e17e2ff4b7e8e82/runtime/JavaScript/src/antlr4/index.d.ts#L1
- TokenSource missing export.
- CommonToken missing TypeScript wrapper declaration and export.
I don’t know why certain classes do not have corresponding TypeScript export class
definition files. It should be identical to the list of exported symbols in Java.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- For the TypeScript target, make sure to export CommonToken, and the methods from Lexer. These are needed for TypeScript ports of various grammars in grammars-v4. Issue #4110. — committed to kaby76/antlr4 by kaby76 a year ago
- For the TypeScript target, make sure to export CommonToken, and the methods from Lexer. These are needed for TypeScript ports of various grammars in grammars-v4. Issue #4110. (#4119) — committed to antlr/antlr4 by kaby76 a year ago
Can you submit a PR ? That would avoid me adding stuff in the wrong place…