cypher-editor-support
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"author": "Neo Technology Inc.", | ||
@@ -10,0 +10,0 @@ "license": "GPL-3.0", |
@@ -21,8 +21,2 @@ /* | ||
import antlr4 from 'antlr4'; | ||
import { CypherParser } from './_generated/CypherParser'; | ||
import { CypherLexer } from './_generated/CypherLexer'; | ||
import { ErrorListener } from './errors/ErrorListener'; | ||
import { ReferencesListener } from './references/ReferencesListener'; | ||
import { ReferencesProvider } from './references/ReferencesProvider'; | ||
import { CompletionTypeResolver } from './completion/CompletionTypeResolver'; | ||
@@ -35,2 +29,3 @@ import { AutoCompletion } from './completion/AutoCompletion'; | ||
import { retryOperation } from './util/retryOperation'; | ||
import { parse } from './util/parse'; | ||
@@ -96,18 +91,5 @@ export class CypherEditorSupport { | ||
const errorListener = new ErrorListener(); | ||
const referencesListener = new ReferencesListener(); | ||
const chars = new antlr4.InputStream(input); | ||
const lexer = new CypherLexer(chars); | ||
lexer.removeErrorListeners(); | ||
lexer.addErrorListener(errorListener); | ||
const tokens = new antlr4.CommonTokenStream(lexer); | ||
const parser = new CypherParser(tokens); | ||
parser.buildParseTrees = true; | ||
parser.removeErrorListeners(); | ||
parser.addErrorListener(errorListener); | ||
parser.addParseListener(referencesListener); | ||
this.input = input; | ||
this.parseTree = parser.cypher(); | ||
const { parseTree, referencesListener, errorListener, referencesProviders } = parse(input); | ||
this.parseTree = parseTree; | ||
@@ -126,13 +108,6 @@ const consoleCommandExists = () => { | ||
const { queries, indexes, queriesAndCommands } = referencesListener; | ||
const { queriesAndCommands } = referencesListener; | ||
this.queriesAndCommands = queriesAndCommands; | ||
this.referencesProviders = referencesProviders; | ||
this.referencesProviders = CypherTypes.SYMBOLIC_CONTEXTS.reduce( | ||
(acc, t) => ({ | ||
...acc, | ||
[t]: new ReferencesProvider(queries, indexes[t]), | ||
}), | ||
{}, | ||
); | ||
this.completion.updateReferenceProviders(this.referencesProviders); | ||
@@ -139,0 +114,0 @@ this.version = version || this.version; |
@@ -23,10 +23,6 @@ /* | ||
import { TreeUtils } from './util/TreeUtils'; | ||
import { parse } from './util/parse'; | ||
import * as CypherTypes from './lang/CypherTypes'; | ||
import CypherKeywords from './lang/CypherKeywords'; | ||
export { | ||
CypherEditorSupport, | ||
CypherTypes, | ||
CypherKeywords, | ||
TreeUtils, | ||
}; | ||
export { CypherEditorSupport, CypherTypes, CypherKeywords, TreeUtils, parse }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
6524295
42
57357