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 4 years ago
- Comments: 20 (20 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 4 years 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 4 years ago
- added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4516) * added DEFAULT_CHANNEL and HIDDEN_CHANNEL constants based on: https://github.com/antlr/antlr4/blob/ebb511a04a60ae5a605aba65471c07dd85... — committed to antlr/antlr4 by RobEin 3 years ago
- added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4516) * added DEFAULT_CHANNEL and HIDDEN_CHANNEL constants based on: https://github.com/antlr/antlr4/blob/ebb511a04a60ae5a605aba65471c07dd85... — committed to neo4j/cypher-language-support by RobEin 3 years ago
- added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4516) * added DEFAULT_CHANNEL and HIDDEN_CHANNEL constants based on: https://github.com/antlr/antlr4/blob/ebb511a04a60ae5a605aba65471c07dd85... — committed to neo4j/cypher-language-support by RobEin 3 years ago
- added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4516) * added DEFAULT_CHANNEL and HIDDEN_CHANNEL constants based on: https://github.com/antlr/antlr4/blob/ebb511a04a60ae5a605aba65471c07dd85... — committed to neo4j/cypher-language-support by RobEin 3 years ago
- Updates antlr4 (#170) * fix: TypeScript: incorrect type in CommonTokenStream Signed-off-by: Johannes Heesterman <johannes@elfsquad.io> * added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4... — committed to neo4j/cypher-language-support by ncordon 3 years ago
- Updates antlr4 (#170) * fix: TypeScript: incorrect type in CommonTokenStream Signed-off-by: Johannes Heesterman <johannes@elfsquad.io> * added Token.DEFAULT_CHANNEL and Token.HIDDEN_CHANNEL (#4... — committed to neo4j/cypher-language-support by ncordon 3 years ago
Can you submit a PR ? That would avoid me adding stuff in the wrong place…