Skip to content

Commit

Permalink
Added release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-lischke committed Nov 21, 2024
1 parent aeeb6c7 commit 2eb19cf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "antlr-ng",
"version": "0.2.0",
"version": "0.3.0",
"description": "Next generation ANTLR Tool",
"type": "module",
"author": "Mike Lischke",
Expand Down
17 changes: 17 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<img src="https://raw.githubusercontent.com/mike-lischke/mike-lischke/master/images/ANTLRng2.svg" title="ANTLR Next Generation" alt="ANTLRng" width="96" height="96"/><label style="font-size: 70%">Part of the Next Generation ANTLR Project</label>

# ANTLRng Release Notes

## 0.2.0

- Big reorganization of the project. Everything of the TS runtime has been moved to an own project.
- The tool files all build fine now.
- Had to add ports for certain ANTLR3 classes for now.
- Tool unit tests are not fixed yet.


## 0.1.0

- Initial commit.
- TypeScript files generated from Java.
- At this point the project contained both, the ANTLR4 tool and the ANTLR4 TS runtime.
2 changes: 1 addition & 1 deletion src/codegen/model/MatchToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class MatchToken extends RuleElement implements LabeledOp {
if (ast instanceof TerminalAST) {
const g = factory.getGrammar()!;
const gen = factory.getGenerator()!;
this.ttype = g.getTokenType(ast.getText()!);
this.ttype = g.getTokenType(ast.getText());
const target = gen.getTarget();
this.name = target.getTokenTypeAsTargetLabel(g, this.ttype);
this.escapedName = target.escapeIfNeeded(this.name);
Expand Down
7 changes: 0 additions & 7 deletions tests/TestASTStructure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ describe("TestASTStructure", () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
const parser = new ANTLRv4Parser(tokens) as (ANTLRv4Parser & Record<string, Function>);

// set up customized tree adaptor if necessary
/*if (this.adaptorClassName !== null) {
const m = parserClass.getMethod("setTreeAdaptor", TreeAdaptor.class);
const adaptorClass = Class.forName(this.adaptorClassName).asSubclass(TreeAdaptor.class);
m.invoke(parser, adaptorClass.newInstance());
}*/

const result = callMethod(parser, ruleName) as ParseTree;

if (parser.numberOfSyntaxErrors > 0) {
Expand Down

0 comments on commit 2eb19cf

Please sign in to comment.