jexl-lezer 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/index.cjs +25 -294
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +24 -293
- package/package.json +17 -7
- package/rollup.config.js +4 -4
- package/src/highlight.js +62 -192
- package/src/{jexl.grammar → javascript.grammar} +735 -745
- package/src/parser.js +21 -21
- package/src/parser.terms.js +166 -165
- package/test/decorator.txt +64 -0
- package/test/expression.txt +686 -0
- package/test/jsx.txt +79 -0
- package/test/semicolon.txt +77 -0
- package/test/statement.txt +404 -0
- package/test/test-javascript.js +17 -0
- package/test/typescript.txt +401 -0
package/README.md
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
# @lezer/javascript
|
|
2
|
+
|
|
3
|
+
This is a JavaScript grammar for the
|
|
4
|
+
[lezer](https://lezer.codemirror.net/) parser system.
|
|
5
|
+
|
|
6
|
+
It parses modern JavaScript, and supports a `"ts"`
|
|
7
|
+
[dialect](https://lezer.codemirror.net/docs/guide/#dialects) to parse
|
|
8
|
+
TypeScript, and a `"jsx"` dialect to parse JSX.
|
|
9
|
+
|
|
10
|
+
The `top` option can be set to `"SingleExpression"` or
|
|
11
|
+
`"SingleClassItem"` to parse an expression or class item instead of a
|
|
12
|
+
full program.
|
|
13
|
+
|
|
14
|
+
The code is licensed under an MIT license.
|