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

lezer

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lezer - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

.rpt2_cache/rpt2_c5d0824ac36316a1434e6081c3d0447762cf20cc/code/cache/5859c16329f9cd84258db16faccf5c2b49b32d4b

6

CHANGELOG.md

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

## 0.4.1 (2019-10-14)
### Bug fixes
Fix an infinite loop where error recovery keeps finding zero-length tokens and imagining it's making progress.
## 0.4.0 (2019-09-10)

@@ -2,0 +8,0 @@

5

dist/index.js

@@ -239,2 +239,4 @@ 'use strict';

var start = this.pos, nextState = action, parser = this.cx.parser;
if (nextEnd > this.pos)
this.badness = (this.badness >> 1) + (this.badness >> 2); // (* 0.75)
if (nextEnd > this.pos || next <= parser.maxNode) {

@@ -248,5 +250,4 @@ this.pos = nextEnd;

this.buffer.push(next, start, nextEnd, 4);
this.badness = (this.badness >> 1) + (this.badness >> 2); // (* 0.75)
}
else { // Shift-and-stay, which means this is skipped token
else { // Shift-and-stay, which means this is a skipped token
if (next <= this.cx.parser.maxNode)

@@ -253,0 +254,0 @@ this.buffer.push(next, this.pos, nextEnd, 4);

2

package.json
{
"name": "lezer",
"version": "0.4.0",
"version": "0.4.1",
"description": "Incremental parser",

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

@@ -199,2 +199,4 @@ import {Action, Term, StateFlag, ParseState} from "./constants"

let start = this.pos, nextState = action, {parser} = this.cx
if (nextEnd > this.pos)
this.badness = (this.badness >> 1) + (this.badness >> 2) // (* 0.75)
if (nextEnd > this.pos || next <= parser.maxNode) {

@@ -206,4 +208,3 @@ this.pos = nextEnd

if (next <= parser.maxNode) this.buffer.push(next, start, nextEnd, 4)
this.badness = (this.badness >> 1) + (this.badness >> 2) // (* 0.75)
} else { // Shift-and-stay, which means this is skipped token
} else { // Shift-and-stay, which means this is a skipped token
if (next <= this.cx.parser.maxNode) this.buffer.push(next, this.pos, nextEnd, 4)

@@ -210,0 +211,0 @@ this.pos = nextEnd

Sorry, the diff of this file is not supported yet

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