Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypher-editor-support

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypher-editor-support - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

src/util/parse.js

2

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc