New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

antlr4-c3

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antlr4-c3 - npm Package Compare versions

Comparing version 3.2.3 to 3.2.4

28

lib/src/CodeCompletionCore.js

@@ -6,3 +6,3 @@ /*

/* eslint-disable max-classes-per-file */
import { ATNState, IntervalSet, ParserRuleContext, Token, Transition, } from "antlr4ng";
import { ATNState, IntervalSet, ParserRuleContext, Token, TransitionType, ATNStateType, } from "antlr4ng";
import { longestCommonPrefix } from "./utils.js";

@@ -127,3 +127,3 @@ /**

// eslint-disable-next-line no-underscore-dangle
const tokenStream = this.parser._input;
const tokenStream = this.parser.tokenStream;
this.tokens = [];

@@ -267,3 +267,3 @@ let offset = this.tokenStartIndex;

state.transitions.forEach((outgoing) => {
if (outgoing.serializationType === Transition.ATOM) {
if (outgoing.serializationType === TransitionType.ATOM) {
if (!outgoing.isEpsilon) {

@@ -322,3 +322,3 @@ const list = outgoing.label.toArray();

stateStack.push(s);
if (s === stopState || s.stateType === ATNState.RULE_STOP) {
if (s === stopState || s.stateType === ATNStateType.RULE_STOP) {
stateStack.pop();

@@ -329,3 +329,3 @@ return false;

for (const transition of s.transitions) {
if (transition.serializationType === Transition.RULE) {
if (transition.serializationType === TransitionType.RULE) {
const ruleTransition = transition;

@@ -345,3 +345,3 @@ if (ruleStack.indexOf(ruleTransition.target.ruleIndex) !== -1) {

}
else if (transition.serializationType === Transition.PREDICATE) {
else if (transition.serializationType === TransitionType.PREDICATE) {
if (this.checkPredicate(transition)) {

@@ -356,3 +356,3 @@ const nextStateFollowSetsIsExhaustive = this.collectFollowSets(transition.target, stopState, followSets, stateStack, ruleStack);

}
else if (transition.serializationType === Transition.WILDCARD) {
else if (transition.serializationType === TransitionType.WILDCARD) {
const set = new FollowSetWithPath();

@@ -366,3 +366,3 @@ set.intervals = IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);

if (label && label.length > 0) {
if (transition.serializationType === Transition.NOT_SET) {
if (transition.serializationType === TransitionType.NOT_SET) {
label = label.complement(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);

@@ -512,3 +512,3 @@ }

}
if (currentEntry.state.stateType === ATNState.RULE_STOP) {
if (currentEntry.state.stateType === ATNStateType.RULE_STOP) {
// Record the token index we are at, to report it to the caller.

@@ -523,3 +523,3 @@ result.add(currentEntry.tokenListIndex);

switch (transition.serializationType) {
case Transition.RULE: {
case TransitionType.RULE: {
const ruleTransition = transition;

@@ -535,3 +535,3 @@ const endStatus = this.processRule(transition.target, currentEntry.tokenListIndex, callStack, ruleTransition.precedence, indentation + 1);

}
case Transition.PREDICATE: {
case TransitionType.PREDICATE: {
if (this.checkPredicate(transition)) {

@@ -545,3 +545,3 @@ statePipeline.push({

}
case Transition.PRECEDENCE: {
case TransitionType.PRECEDENCE: {
const predTransition = transition;

@@ -556,3 +556,3 @@ if (predTransition.precedence >= this.precedenceStack[this.precedenceStack.length - 1]) {

}
case Transition.WILDCARD: {
case TransitionType.WILDCARD: {
if (atCaret) {

@@ -587,3 +587,3 @@ if (!this.translateStackToRuleIndex(callStack)) {

if (set && set.length > 0) {
if (transition.serializationType === Transition.NOT_SET) {
if (transition.serializationType === TransitionType.NOT_SET) {
set = set.complement(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);

@@ -590,0 +590,0 @@ }

{
"name": "antlr4-c3",
"version": "3.2.3",
"version": "3.2.4",
"description": "A code completion core implementation for ANTLR4 based parsers",

@@ -23,5 +23,4 @@ "author": "Mike Lischke",

"prepublishOnly": "npm run generate && npm run test",
"test": "jest --testMatch [ \"**/tests/**/*.spec.ts\" ] --no-coverage --watchAll=false --max-worker=1",
"test-ci": "jest --testMatch [ \"**/tests/**/*.spec.ts\" ] --no-coverage --watchAll=false --silent",
"test-coverage": "jest --testMatch [ \"**/tests/**/*.spec.ts\" ] --coverage --silent",
"test-coverage": "npm run test --coverage",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --no-coverage",
"generate": "antlr4ng -Dlanguage=TypeScript tests/CPP14.g4 tests/Expr.g4 tests/Whitebox.g4 -no-listener -no-visitor -o tests/generated -Xexact-output-dir",

@@ -36,3 +35,3 @@ "eslint": "eslint ."

"@typescript-eslint/parser": "6.6.0",
"antlr4ng-cli": "1.0.0",
"antlr4ng-cli": "1.0.1",
"eslint": "8.48.0",

@@ -44,8 +43,7 @@ "eslint-plugin-import": "2.28.1",

"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"typescript": "5.2.2"
},
"dependencies": {
"antlr4ng": "1.0.7"
"antlr4ng": "1.1.1"
}
}

Sorry, the diff of this file is not supported yet

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