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

antlr4

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antlr4 - npm Package Compare versions

Comparing version 4.12.0-beta.0 to 4.12.0-beta.1

2

package.json
{
"name": "antlr4",
"version": "4.12.0-beta.0",
"version": "4.12.0-beta.1",
"type": "module",

@@ -5,0 +5,0 @@ "description": "JavaScript runtime for ANTLR4",

@@ -1,4 +0,7 @@

import RuleContext from './RuleContext.js';
import ParserRuleContext from './ParserRuleContext.js';
/* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
import PredictionContext from './PredictionContext.js';
export default { RuleContext, ParserRuleContext }
export default { PredictionContext }

@@ -70,1 +70,2 @@ /* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.

PredictionContext.id = PredictionContext.globalNodeCount;
PredictionContext.trace_atn_sim = false;

@@ -91,3 +91,3 @@ /* Copyright (c) 2012-2022 The ANTLR Project Contributors. All rights reserved.

// At least one of a or b is array
// If one is $ and rootIsWildcard, return $ as// wildcard
// If one is $ and rootIsWildcard, return $ as * wildcard
if (rootIsWildcard) {

@@ -136,2 +136,3 @@ if (a instanceof EmptyPredictionContext) {

if (previous !== null) {
if ( PredictionContext.trace_atn_sim ) console.log("mergeArrays a="+a+",b="+b+" -> previous");
return previous;

@@ -141,2 +142,3 @@ }

if (previous !== null) {
if ( PredictionContext.trace_atn_sim ) console.log("mergeArrays a="+a+",b="+b+" -> previous");
return previous;

@@ -150,4 +152,4 @@ }

let mergedReturnStates = [];
let mergedParents = [];
let mergedReturnStates = new Array(a.returnStates.length + b.returnStates.length).fill(0);
let mergedParents = new Array(a.returnStates.length + b.returnStates.length).fill(null);
// walk and merge to yield mergedParents, mergedReturnStates

@@ -218,12 +220,14 @@ while (i < a.returnStates.length && j < b.returnStates.length) {

// TODO: track whether this is possible above during merge sort for speed
if (M === a) {
if (M.equals(a)) {
if (mergeCache !== null) {
mergeCache.set(a, b, a);
}
if ( PredictionContext.trace_atn_sim ) console.log("mergeArrays a="+a+",b="+b+" -> a");
return a;
}
if (M === b) {
if (M.equals(b)) {
if (mergeCache !== null) {
mergeCache.set(a, b, b);
}
if ( PredictionContext.trace_atn_sim ) console.log("mergeArrays a="+a+",b="+b+" -> b");
return b;

@@ -236,2 +240,5 @@ }

}
if ( PredictionContext.trace_atn_sim ) console.log("mergeArrays a="+a+",b="+b+" -> "+M);
return M;

@@ -238,0 +245,0 @@ }

@@ -64,2 +64,2 @@ /* Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.

import CodePointAt from './polyfills/codepointat.js';
import FromCodePoint from './polyfills/fromcodepoint.js';
import FromCodePoint from './polyfills/fromcodepoint.js';

Sorry, the diff of this file is too big to display

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