@lezer/generator
Advanced tools
Comparing version 1.1.1 to 1.1.2
import { resolve, dirname } from 'path'; | ||
import { promises } from 'fs'; | ||
import { buildParserFile } from '..'; | ||
import { buildParserFile } from './index.ts'; | ||
@@ -5,0 +5,0 @@ function lezer() { |
@@ -6,4 +6,9 @@ import { Tree, NodeType, Parser } from "@lezer/common"; | ||
name: string; | ||
text: string; | ||
expected: string; | ||
configStr: string; | ||
config: object; | ||
strict: boolean; | ||
run(parser: Parser): void; | ||
}[]; | ||
export {}; |
@@ -176,3 +176,3 @@ var __assign = (this && this.__assign) || function () { | ||
if (mayIgnore === void 0) { mayIgnore = defaultIgnore; } | ||
var caseExpr = /\s*#\s*(.*)(?:\r\n|\r|\n)([^]*?)==+>([^]*?)(?:$|(?:\r\n|\r|\n)+(?=#))/gy; | ||
var caseExpr = /\s*#[ \t]*(.*)(?:\r\n|\r|\n)([^]*?)==+>([^]*?)(?:$|(?:\r\n|\r|\n)+(?=#))/gy; | ||
var tests = []; | ||
@@ -184,9 +184,14 @@ var lastIndex = 0; | ||
throw new Error("Unexpected file format in ".concat(fileName, " around\n\n").concat(toLineContext(file, lastIndex))); | ||
var text = m[2].trim(), expected = m[3].trim(); | ||
var _a = /(.*?)(\{.*?\})?$/.exec(m[1]), name_2 = _a[1], configStr = _a[2]; | ||
var config = configStr ? JSON.parse(configStr) : null; | ||
var text = m[2].trim(), expected = m[3]; | ||
var strict = !/⚠|\.\.\./.test(expected); | ||
tests.push({ | ||
name: name_2, | ||
text: text, | ||
expected: expected, | ||
configStr: configStr, | ||
config: config, | ||
strict: strict, | ||
run: function (parser) { | ||
var strict = !/⚠|\.\.\./.test(expected); | ||
if (parser.configure && (strict || config)) | ||
@@ -193,0 +198,0 @@ parser = parser.configure(__assign({ strict: strict }, config)); |
import { Term } from "./grammar"; | ||
export declare const MAX_CHAR = 65534; | ||
export declare const MAX_CHAR = 65535; | ||
export declare class Edge { | ||
@@ -4,0 +4,0 @@ readonly from: number; |
{ | ||
"name": "@lezer/generator", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Parser generator for the incremental lezer parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
519514
13038