Comparing version 2.0.6 to 2.0.7
@@ -69,3 +69,3 @@ import { IntervalSet } from "../misc/IntervalSet.js"; | ||
*/ | ||
getExpectedTokens(stateNumber: number, context: RuleContext): IntervalSet; | ||
getExpectedTokens(stateNumber: number, context: RuleContext | null): IntervalSet; | ||
/** | ||
@@ -72,0 +72,0 @@ * Compute the set of valid tokens that can occur starting in state {@code s}. |
@@ -12,2 +12,3 @@ import { Interval } from "./misc/Interval.js"; | ||
* get a substring from the stream at start to stop (inclusive). | ||
* | ||
* @param start Start index | ||
@@ -19,2 +20,3 @@ * @param stop Stop index | ||
* get a substring from the stream at specified interval (inclusive). | ||
* | ||
* @param interval | ||
@@ -21,0 +23,0 @@ */ |
@@ -8,1 +8,2 @@ export * from "./BitSet.js"; | ||
export * from "./ParseCancellationException.js"; | ||
export * from "./InterpreterDataReader.js"; |
@@ -82,4 +82,5 @@ import { Parser } from "./Parser.js"; | ||
*/ | ||
toStringTree(recog: Parser): string; | ||
toStringTree(ruleNames: string[], recog: Parser): string; | ||
toString(ruleNames?: string[] | null, stop?: RuleContext | null): string; | ||
} |
@@ -112,3 +112,3 @@ import { Token } from "./Token.js"; | ||
/** | ||
* Replace the specified range of tokens with the supplied text | ||
* Replace the specified range of tokens with the supplied text. | ||
*/ | ||
@@ -115,0 +115,0 @@ replace(from: Token | number, to: Token | number, text: string | null, programName?: string): void; |
@@ -7,4 +7,4 @@ import { ParseTree } from "./ParseTree.js"; | ||
* Print out a whole tree in LISP form. {@link getNodeText} is used on the | ||
* node payloads to get the text for the nodes. Detect | ||
* parse trees and extract data appropriately. | ||
* node payloads to get the text for the nodes. Detect | ||
* parse trees and extract data appropriately. | ||
*/ | ||
@@ -11,0 +11,0 @@ static toStringTree(tree: ParseTree, ruleNames: string[] | null, recog?: Parser | null): string; |
{ | ||
"name": "antlr4ng", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Alternative JavaScript/TypeScript runtime for ANTLR4", |
@@ -18,3 +18,4 @@ [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/mike-lischke/antlr4ng/nodejs.yml?style=for-the-badge&logo=github)](https://github.com/mike-lischke/antlr4ng/actions/workflows/nodejs.yml) | ||
- Smaller node package (no test specs or other unnecessary files). | ||
- No CommonJS support anymore (ESM only). No differentiation between node and browser environments. | ||
- No differentiation between node and browser environments. | ||
- InterpreterDataReader implementation. | ||
- Includes the `antlr4ng-cli` tool to generate parser files compatible with this runtime. This tool uses a custom build of the ANTLR4 tool. | ||
@@ -112,3 +113,3 @@ | ||
This runtime is monitored for performance regressions. The following table shows the results of the benchmarks run on last release: | ||
This runtime is monitored for performance regressions. The following tables show the results of the benchmarks previously run on the JS runtime and on last release of this one. Warm times were taken from 5 runs with the 2 slowest stripped off and averaged. | ||
@@ -128,6 +129,6 @@ Pure JavaScript release (with type definitions): | ||
| ---- | -------- | ------- | | ||
| Query Collection| 4823 ms | 372 ms | | ||
| Example File | 680 ms | 196 ms | | ||
| Large Inserts | 15176 ms | 15115 ms | | ||
| Total | 20738 ms | 15704 ms | | ||
| Query Collection| 4724 ms | 337 ms | | ||
| Example File | 672 ms | 192 ms | | ||
| Large Inserts | 15144 ms | 15039 ms | | ||
| Total | 20600 ms | 15592 ms | | ||
@@ -150,2 +151,8 @@ The numbers are interesting. While the cold run for the query collection is almost 3 seconds faster with pure TS, the overall numbers in warm state are worse. So it's not a pure JS vs. TS situation, but something else must have additional influence and this will be investigated. After all the TypeScript code is ultimately transpiled to JS, so it's probably a matter of how effective the TS code is translated to JS. | ||
### 2.0.7 | ||
- Added an InterpreterDataReader implementation (copied from the vscode-antlr4 extension). | ||
- Benchmark values listed here are now computed from 5 runs, instead just one. | ||
### 2.0.6 | ||
@@ -152,0 +159,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
622648
149
7938
237