Skip to content

Commit

Permalink
Switched to new antlr-format package
Browse files Browse the repository at this point in the history
The formatter has been extracted into an own Node package.

Signed-off-by: Mike Lischke <mike@lischke-online.de>
  • Loading branch information
mike-lischke committed Nov 25, 2023
1 parent e76f980 commit 6e09d40
Show file tree
Hide file tree
Showing 56 changed files with 557 additions and 59,520 deletions.
948 changes: 552 additions & 396 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@
"@unicode/unicode-11.0.0": "1.5.2",
"@vscode/debugadapter": "1.64.0",
"@vscode/debugprotocol": "1.64.0",
"antlr-format": "2.0.1",
"antlr4-c3": "3.3.4",
"antlr4ng": "2.0.2",
"await-notify": "1.0.1",
Expand Down
2,217 changes: 0 additions & 2,217 deletions src/backend/Formatter.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/backend/SourceContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {

import { CodeCompletionCore, BaseSymbol, LiteralSymbol } from "antlr4-c3";

import { GrammarFormatter } from "antlr-format";

import {
ANTLRv4Parser, ParserRuleSpecContext, LexerRuleSpecContext, GrammarSpecContext, OptionsSpecContext, ModeSpecContext,
} from "../parser/ANTLRv4Parser.js";
Expand Down Expand Up @@ -49,7 +51,6 @@ import {
} from "./ContextSymbolTable.js";

import { SentenceGenerator } from "./SentenceGenerator.js";
import { GrammarFormatter } from "./Formatter.js";

import { GrammarLexerInterpreter } from "./GrammarLexerInterpreter.js";
import { printableUnicodePoints } from "./Unicode.js";
Expand Down
4 changes: 2 additions & 2 deletions tests/backend/atn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ describe("ATN Tests", () => {
expect(graph.nodes).toHaveLength(4);
expect(graph.nodes[0].name).toEqual("58");
expect(graph.nodes[0].type).toEqual(2);
expect(graph.nodes[1].name).toEqual("351");
expect(graph.nodes[1].name).toEqual("355");
expect(graph.nodes[1].type).toEqual(1);
expect(graph.nodes[2].name).toEqual("352");
expect(graph.nodes[2].name).toEqual("356");
expect(graph.nodes[2].type).toEqual(1);
expect(graph.nodes[3].name).toEqual("59");
expect(graph.nodes[3].type).toEqual(7);
Expand Down
Loading

0 comments on commit 6e09d40

Please sign in to comment.