@lezer/javascript
Advanced tools
Sorry, the diff of this file is not supported yet
| import {LRParser} from "@lezer/lr" | ||
| export const parser: LRParser |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
+8
-0
@@ -0,1 +1,9 @@ | ||
| ## 1.4.4 (2023-07-03) | ||
| ### Bug fixes | ||
| Add support for `using` syntax. | ||
| Make the package work with new TS resolution styles. | ||
| ## 1.4.3 (2023-04-24) | ||
@@ -2,0 +10,0 @@ |
+3
-3
| { | ||
| "name": "@lezer/javascript", | ||
| "version": "1.4.3", | ||
| "version": "1.4.4", | ||
| "description": "lezer-based JavaScript grammar", | ||
@@ -8,6 +8,6 @@ "main": "dist/index.cjs", | ||
| "exports": { | ||
| "import": "./dist/index.es.js", | ||
| "import": "./dist/index.js", | ||
| "require": "./dist/index.cjs" | ||
| }, | ||
| "module": "dist/index.es.js", | ||
| "module": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
@@ -14,0 +14,0 @@ "author": "Marijn Haverbeke <marijn@haverbeke.berlin>", |
+1
-1
@@ -10,3 +10,3 @@ import {nodeResolve} from "@rollup/plugin-node-resolve" | ||
| format: "es", | ||
| file: "./dist/index.es.js" | ||
| file: "./dist/index.js" | ||
| }], | ||
@@ -13,0 +13,0 @@ external(id) { return !/^[\.\/]/.test(id) }, |
+17
-17
| // This file was generated by lezer-generator. You probably shouldn't edit it. | ||
| export const | ||
| noSemi = 302, | ||
| noSemi = 303, | ||
| incdec = 1, | ||
| incdecPrefix = 2, | ||
| insertSemi = 303, | ||
| spaces = 305, | ||
| newline = 306, | ||
| insertSemi = 304, | ||
| spaces = 306, | ||
| newline = 307, | ||
| LineComment = 3, | ||
@@ -92,16 +92,16 @@ BlockComment = 4, | ||
| VariableDeclaration = 203, | ||
| TypeAliasDeclaration = 206, | ||
| InterfaceDeclaration = 207, | ||
| EnumDeclaration = 209, | ||
| NamespaceDeclaration = 212, | ||
| AmbientDeclaration = 215, | ||
| ExportGroup = 222, | ||
| ImportDeclaration = 225, | ||
| ImportGroup = 226, | ||
| ForSpec = 229, | ||
| ForInSpec = 230, | ||
| ForOfSpec = 231, | ||
| SingleExpression = 266, | ||
| SingleClassItem = 267, | ||
| TypeAliasDeclaration = 207, | ||
| InterfaceDeclaration = 208, | ||
| EnumDeclaration = 210, | ||
| NamespaceDeclaration = 213, | ||
| AmbientDeclaration = 216, | ||
| ExportGroup = 223, | ||
| ImportDeclaration = 226, | ||
| ImportGroup = 227, | ||
| ForSpec = 230, | ||
| ForInSpec = 231, | ||
| ForOfSpec = 232, | ||
| SingleExpression = 267, | ||
| SingleClassItem = 268, | ||
| Dialect_jsx = 0, | ||
| Dialect_ts = 1 |
+4
-7
@@ -6,4 +6,3 @@ /* Hand-written tokenizers for JavaScript tokens that can't be | ||
| import {insertSemi, noSemi, incdec, incdecPrefix, | ||
| spaces, newline, BlockComment, LineComment, | ||
| Dialect_ts} from "./parser.terms.js" | ||
| spaces, newline, BlockComment, LineComment} from "./parser.terms.js" | ||
@@ -13,5 +12,3 @@ const space = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, | ||
| const braceR = 125, semicolon = 59, slash = 47, star = 42, | ||
| plus = 43, minus = 45, backslash = 92, | ||
| angleL = 60, angleR = 62, period = 46 | ||
| const braceR = 125, semicolon = 59, slash = 47, star = 42, plus = 43, minus = 45 | ||
@@ -28,3 +25,3 @@ export const trackNewline = new ContextTracker({ | ||
| let {next} = input | ||
| if ((next == braceR || next == -1 || stack.context) && stack.canShift(insertSemi)) | ||
| if (next == braceR || next == -1 || stack.context) | ||
| input.acceptToken(insertSemi) | ||
@@ -37,3 +34,3 @@ }, {contextual: true, fallback: true}) | ||
| if (next == slash && ((after = input.peek(1)) == slash || after == star)) return | ||
| if (next != braceR && next != semicolon && next != -1 && !stack.context && stack.canShift(noSemi)) | ||
| if (next != braceR && next != semicolon && next != -1 && !stack.context) | ||
| input.acceptToken(noSemi) | ||
@@ -40,0 +37,0 @@ }, {contextual: true}) |
@@ -1,2 +0,2 @@ | ||
| import {parser} from "../dist/index.es.js" | ||
| import {parser} from "../dist/index.js" | ||
| import {fileTests} from "@lezer/generator/dist/test" | ||
@@ -6,3 +6,3 @@ | ||
| import * as path from "path" | ||
| import { fileURLToPath } from 'url'; | ||
| import {fileURLToPath} from "url" | ||
| let caseDir = path.dirname(fileURLToPath(import.meta.url)) | ||
@@ -9,0 +9,0 @@ |
Sorry, the diff of this file is too big to display
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 too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
287177
0.31%23
15%1284
0.08%29
-23.68%