Comparing version 1.1.2 to 1.1.3
@@ -1,2 +0,2 @@ | ||
import { ParserRuleContext } from 'antlr4ts'; | ||
import { RuleContext } from 'antlr4ts'; | ||
export declare class DuplicateSymbolError extends Error { | ||
@@ -52,3 +52,3 @@ } | ||
name: string; | ||
context: ParserRuleContext | undefined; | ||
context: RuleContext | undefined; | ||
protected parent: Symbol | undefined; | ||
@@ -55,0 +55,0 @@ constructor(name?: string); |
{ | ||
"name": "antlr4-c3", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "A code completion core implmentation for ANTLR4 based parsers", | ||
@@ -9,3 +9,4 @@ "main": "out/index.js", | ||
"prepublishOnly": "npm run test", | ||
"test": "npm install typescript && tsc && npm install mocha && mocha out/test" | ||
"test": "tsc --version && tsc && mocha out/test", | ||
"generate": "antlr4ts test/CPP14.g4 test/Expr.g4 -no-listener -no-visitor" | ||
}, | ||
@@ -24,7 +25,6 @@ "repository": { | ||
"dependencies": { | ||
"antlr4ts": "^0.4.0-burt.2" | ||
"antlr4ts": "^0.4.1-alpha.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^3.4.34", | ||
"@types/fs-extra": "^3.0.3", | ||
"@types/mocha": "^2.2.32", | ||
@@ -34,6 +34,5 @@ "@types/node": "^6.0.78", | ||
"chai": "^3.5.0", | ||
"fs-extra": "^3.0.1", | ||
"mocha": "^2.5.3", | ||
"path": "^0.12.7", | ||
"typescript": "^2.3.4" | ||
"typescript": "~2.3.4" | ||
}, | ||
@@ -40,0 +39,0 @@ "author": "Mike Lischke", |
@@ -106,3 +106,3 @@ [![NPM](https://nodei.co/npm/antlr4-c3.png?downloads=true&downloadRank=true)](https://nodei.co/npm/antlr4-c3/) | ||
All these could be passed in individually, but since your parser contains all of that anyway and we need a parser for predicate execution, the API has been designed to take a parser instead. In real world applications you will have a parser anyway (e.g. for error checking), which is perfect as ATN and input provider for the code completion core. But keep in mind: whatever parser you pass in it must have a fully set up token stream. It's not required that it parsed anything before calling the code completion engine and the current stream positions don't matter either. | ||
All these could be passed in individually, but since your parser contains all of that anyway and we need a parser for predicate execution, the API has been designed to take a parser instead (predicates work however only if written for the Javascript/Typescript target). In real world applications you will have a parser anyway (e.g. for error checking), which is perfect as ATN and input provider for the code completion core. But keep in mind: whatever parser you pass in it must have a fully set up token stream. It's not required that it parsed anything before calling the code completion engine and the current stream positions don't matter either. | ||
@@ -120,7 +120,7 @@ The returned candidate collection contains fields for lexer tokens (mostly keywords, but also other tokens if they are not on the ignore list) and parser rule indexes. This collection is defined as: | ||
```typescript | ||
```antlr | ||
createTable: CREATE TABLE (IF NOT EXISTS)? ...; | ||
``` | ||
Here, if a possible candidate is the `IF` keyword, you can also show the entire `IF NOT EXISTS` sequence to the user (and let him complete all 3 words in one go in the source code). The engine will return a candidate entry for `IF` with a token list containing `NOT` and `EXISTS`. This list will of course update properly when the user comes to `NOT`. Then you will get a candidate entry for `NOT` and an additional list of just `EXISTS`. | ||
Here, if a possible candidate is the `IF` keyword, you can also show the entire `IF NOT EXISTS` sequence to the user (and let him complete all 3 words in one go in the source code). The engine will return a candidate entry for `IF` with a token list containing `NOT` and `EXISTS`. This list will of course update properly when the user comes to `NOT`. Then you will get a candidate entry for `NOT` and an additional list consisting of just `EXISTS`. | ||
@@ -127,0 +127,0 @@ Essential for getting any rule index, which you can use to query your symbol table, is that you specify those you want in the `CodeCompletionCore.preferredRules` field before running `CodeCompletionCore.collectCandidates()`. |
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
163889
8
+ Addedantlr4ts@0.4.1-alpha.0(transitive)
- Removedantlr4ts@0.4.0-burt.2(transitive)
Updatedantlr4ts@^0.4.1-alpha.0