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

@lezer/generator

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

@lezer/generator - npm Package Compare versions

Comparing version 0.15.4 to 0.16.0

3

dist/build.d.ts

@@ -1,2 +0,2 @@

import { NodeProp } from "@lezer/common";
import { NodeProp, NodePropSource } from "@lezer/common";
import { LRParser, ExternalTokenizer, Stack, ContextTracker } from "@lezer/lr";

@@ -12,2 +12,3 @@ export declare type BuildOptions = {

}) => ExternalTokenizer;
externalPropSource?: (name: string) => NodePropSource;
externalSpecializer?: (name: string, terms: {

@@ -14,0 +15,0 @@ [name: string]: number;

@@ -12,2 +12,3 @@ export declare class Node {

readonly externalSpecializers: readonly ExternalSpecializeDeclaration[];
readonly externalPropSources: readonly ExternalPropSourceDeclaration[];
readonly precedences: PrecDeclaration | null;

@@ -23,3 +24,3 @@ readonly mainSkip: Expression | null;

readonly autoDelim: boolean;
constructor(start: number, rules: readonly RuleDeclaration[], topRules: readonly RuleDeclaration[], tokens: TokenDeclaration | null, context: ContextDeclaration | null, externalTokens: readonly ExternalTokenDeclaration[], externalSpecializers: readonly ExternalSpecializeDeclaration[], precedences: PrecDeclaration | null, mainSkip: Expression | null, scopedSkip: readonly {
constructor(start: number, rules: readonly RuleDeclaration[], topRules: readonly RuleDeclaration[], tokens: TokenDeclaration | null, context: ContextDeclaration | null, externalTokens: readonly ExternalTokenDeclaration[], externalSpecializers: readonly ExternalSpecializeDeclaration[], externalPropSources: readonly ExternalPropSourceDeclaration[], precedences: PrecDeclaration | null, mainSkip: Expression | null, scopedSkip: readonly {
expr: Expression;

@@ -101,2 +102,7 @@ topRules: readonly RuleDeclaration[];

}
export declare class ExternalPropSourceDeclaration extends Node {
readonly id: Identifier;
readonly source: string;
constructor(start: number, id: Identifier, source: string);
}
export declare class ExternalPropDeclaration extends Node {

@@ -103,0 +109,0 @@ readonly id: Identifier;

@@ -126,8 +126,8 @@ var __assign = (this && this.__assign) || function () {

tree.iterate({
enter: function (type, start) {
if (!type.name)
enter: function (n) {
if (!n.name)
return;
var last = stack.length - 1, index = pos[last], seq = stack[last];
var next = index < seq.length ? seq[index] : null;
if (next && next.matches(type)) {
if (next && next.matches(n.type)) {
if (next.wildcard) {

@@ -141,3 +141,3 @@ pos[last]++;

}
else if (mayIgnore(type)) {
else if (mayIgnore(n.type)) {
return false;

@@ -148,11 +148,11 @@ }

var after_1 = next ? next.name + (parent_1 == "tree" ? "" : " in " + parent_1) : "end of ".concat(parent_1);
throw new Error("Expected ".concat(after_1, ", got ").concat(type.name, " at ").concat(start, " \n").concat(tree));
throw new Error("Expected ".concat(after_1, ", got ").concat(n.name, " at ").concat(n.to, " \n").concat(tree));
}
},
leave: function (type, start) {
if (!type.name)
leave: function (n) {
if (!n.name)
return;
var last = stack.length - 1, index = pos[last], seq = stack[last];
if (index < seq.length)
throw new Error("Unexpected end of ".concat(type.name, ". Expected ").concat(seq.slice(index).map(function (s) { return s.name; }).join(", "), " at ").concat(start, "\n").concat(tree));
throw new Error("Unexpected end of ".concat(n.name, ". Expected ").concat(seq.slice(index).map(function (s) { return s.name; }).join(", "), " at ").concat(n.from, "\n").concat(tree));
pos.pop();

@@ -159,0 +159,0 @@ stack.pop();

{
"name": "@lezer/generator",
"version": "0.15.4",
"version": "0.16.0",
"description": "Parser generator for the incremental lezer parser",

@@ -37,4 +37,4 @@ "main": "dist/index.cjs",

"dependencies": {
"@lezer/common": "^0.15.0",
"@lezer/lr": "^0.15.0"
"@lezer/common": "^0.16.0",
"@lezer/lr": "^0.16.0"
},

@@ -41,0 +41,0 @@ "files": [

Sorry, the diff of this file is not supported yet

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

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