@surrealdb/lezer 1.0.0 → 1.0.2
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.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$ lezer-generator src/surrealql.grammar -o src/parser.js && rollup -c
|
|
2
|
+
Precedence specified for unknown token "f'" (src/surrealql.grammar 1635:15)
|
|
3
|
+
Precedence specified for unknown token "f\"" (src/surrealql.grammar 1635:20)
|
|
4
|
+
Wrote src/parser.js and src/parser.terms.js
|
|
5
|
+
[36m
|
|
6
|
+
[1m./src/index.js[22m → [1m./dist/index.cjs, ./dist/index.js[22m...[39m
|
|
7
|
+
[32mcreated [1m./dist/index.cjs, ./dist/index.js[22m in [1m88ms[22m[39m
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
$ bun run test/test-surrealql.js
|
|
2
|
+
File statement.txt:
|
|
3
|
+
✘ Simple Select
|
|
4
|
+
Expected Any in SelectStatement, got Fields at 8
|
|
5
|
+
SurrealQL(SelectStatement(Keyword,Fields(Any),Keyword,Ident))
|
|
6
|
+
✘ Define Function
|
|
7
|
+
Expected ParamList in DefineStatement, got ParamDefinition at 39
|
|
8
|
+
SurrealQL(DefineStatement(Keyword,Keyword,FunctionName,ParamDefinition(VariableName,Colon,Type(TypeName)),Block(BraceOpen,ReturnStatement(Keyword,BinaryExpression(BinaryExpression(String,Operator,VariableName),Operator,String)),BraceClose)),Comment,ReturnStatement(Keyword,FunctionCall(FunctionName,ArgumentList(String))))
|
|
9
|
+
✔ Remove Function
|
|
10
|
+
✔ Live Select targets
|
|
11
|
+
✘ Let Substatements
|
|
12
|
+
Expected VariableName in LetStatement, got ParamDefinition at 8
|
|
13
|
+
SurrealQL(LetStatement(Keyword,ParamDefinition(VariableName),SubQuery(SelectStatement(Keyword,Fields(Any),Keyword,Int))),LetStatement(Keyword,ParamDefinition(VariableName),SelectStatement(Keyword,Fields(Any),Keyword,Int)))
|
|
14
|
+
✔ Block Comments
|
|
15
|
+
✘ Version Clause
|
|
16
|
+
Expected Any in SelectStatement, got Fields at 8
|
|
17
|
+
SurrealQL(SelectStatement(Keyword,Fields(Any),Keyword,Ident,VersionClause(Keyword,String)))
|
|
18
|
+
✘ Recurse part
|
|
19
|
+
Expected BraceClose in Recurse, got RecurseOptions at 16
|
|
20
|
+
SurrealQL(Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(RangeOp),RecurseOptions,BraceClose)),Lookup(LookupRight,Ident),Lookup(LookupRight,Ident)),Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(RangeOp),RecurseOptions,BraceClose,Lookup(LookupRight,Ident),Lookup(LookupRight,Ident))),Subscript(Ident)),Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(RangeOp),RecurseOptions,BraceClose)),Subscript(Destructure(BraceOpen,Ident,Ident,Ident,Colon,Lookup(LookupRight,Ident),Lookup(LookupRight,Ident),Subscript(At),BraceClose))),Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(Int),RecurseOptions,BraceClose))),Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(Int,RangeOp),RecurseOptions,BraceClose))),Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(Int,RangeOp,Int),RecurseOptions,BraceClose))),Path(RecordId(RecordTbIdent,Colon,RecordIdIdent),Subscript(Recurse(BraceOpen,RecurseRange(RangeOp,Int),RecurseOptions,BraceClose))),Path(At,Subscript(Ident)),Path(At,Ident))
|
|
21
|
+
File value.txt:
|
|
22
|
+
✔ Numbers
|
|
23
|
+
✔ Strings
|
|
24
|
+
✔ Identifiers
|
|
25
|
+
✔ Binary operators
|
|
26
|
+
✔ Objects
|
|
27
|
+
✔ Points
|
|
28
|
+
✔ Function Calls
|
|
29
|
+
✔ Durations
|
|
30
|
+
✔ JavaScript functions
|
|
31
|
+
✔ Literals
|
|
32
|
+
✔ Keyword names in ident position
|
|
33
|
+
✘ Idiom paths
|
|
34
|
+
No parse at 107
|
|
35
|
+
✘ Record ID number(ident)
|
|
36
|
+
Expected Int in RecordId, got RecordIdIdent at 8
|
|
37
|
+
SurrealQL(RecordId(RecordTbIdent,Colon,RecordIdIdent),RecordId(RecordTbIdent,Colon,RecordIdIdent))
|
|
38
|
+
✔ Casting
|
|
39
|
+
✔ Ranges
|
|
40
|
+
✔ Record ID Call
|
|
41
|
+
✘ Format Strings
|
|
42
|
+
Expected FormatString in SurrealQL, got String at 51
|
|
43
|
+
SurrealQL(String,String)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surrealdb/lezer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"author": "SurrealDB",
|
|
5
5
|
"description": "SurrealQL grammar for Lezer",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build": "lezer-generator src/surrealql.grammar -o src/parser.js && rollup -c",
|
|
21
21
|
"build-debug": "lezer-generator src/surrealql.grammar -o src/parser.js --names && rollup -c",
|
|
22
22
|
"run-tests": "bun run test/test-surrealql.js",
|
|
23
|
-
"deploy": "
|
|
23
|
+
"deploy": "bun publish --access public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@lezer/highlight": "^1.2.1",
|