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

@lezer/lr

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lezer/lr - npm Package Compare versions

Comparing version 0.15.5 to 0.15.6

17

dist/index.js

@@ -200,3 +200,4 @@ import { Parser, NodeSet, NodeType, DefaultBufferLength, NodeProp, Tree } from '@lezer/common';

}
// Add a prebuilt (reused) node into the buffer. @internal
// Add a prebuilt (reused) node into the buffer.
/// @internal
useNode(value, next) {

@@ -1025,4 +1026,11 @@ let index = this.p.reused.length - 1;

Rec[Rec["MaxRemainingPerStep"] = 3] = "MaxRemainingPerStep";
Rec[Rec["MinBufferLengthPrune"] = 200] = "MinBufferLengthPrune";
// When two stacks have been running independently long enough to
// add this many elements to their buffers, prune one.
Rec[Rec["MinBufferLengthPrune"] = 500] = "MinBufferLengthPrune";
Rec[Rec["ForceReduceLimit"] = 10] = "ForceReduceLimit";
// Once a stack reaches this depth (in .stack.length) force-reduce
// it back to CutTo to avoid creating trees that overflow the stack
// on recursive traversal.
Rec[Rec["CutDepth"] = 15000] = "CutDepth";
Rec[Rec["CutTo"] = 9000] = "CutTo";
})(Rec || (Rec = {}));

@@ -1123,3 +1131,3 @@ class Parse {

if (stack.sameState(other) ||
stack.buffer.length > 200 /* MinBufferLengthPrune */ && other.buffer.length > 200 /* MinBufferLengthPrune */) {
stack.buffer.length > 500 /* MinBufferLengthPrune */ && other.buffer.length > 500 /* MinBufferLengthPrune */) {
if (((stack.score - other.score) || (stack.buffer.length - other.buffer.length)) > 0) {

@@ -1182,2 +1190,5 @@ newStacks.splice(j--, 1);

}
if (stack.stack.length >= 15000 /* CutDepth */) {
while (stack.stack.length > 9000 /* CutTo */ && stack.forceReduce()) { }
}
let actions = this.tokens.getActions(stack);

@@ -1184,0 +1195,0 @@ for (let i = 0; i < actions.length;) {

2

package.json
{
"name": "@lezer/lr",
"version": "0.15.5",
"version": "0.15.6",
"description": "Incremental parser",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

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