mirror of
https://github.com/danbulant/lang-surrealql
synced 2026-09-20 06:34:01 +00:00
first commit
This commit is contained in:
commit
bfa5f9ef39
4 changed files with 30 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
/node_modules
|
||||||
|
/pnpm-lock.yaml
|
||||||
18
package.json
Normal file
18
package.json
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"name": "lang-surrealql",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "lezer-generator src/surrealql.grammar -o src/surrealql.grammar.js"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"devDependencies": {
|
||||||
|
"@lezer/generator": "^1.6.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@lezer/lr": "^1.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
10
src/surrealql.grammar
Normal file
10
src/surrealql.grammar
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
@top File { (Identifier | Number | String)+ }
|
||||||
|
|
||||||
|
@skip { space }
|
||||||
|
|
||||||
|
@tokens {
|
||||||
|
space { @whitespace+ }
|
||||||
|
Identifier { $[A-Za-z_]+ }
|
||||||
|
Number { $[0-9]+ }
|
||||||
|
String { '"' !["]* '"' }
|
||||||
|
}
|
||||||
0
test.js
Normal file
0
test.js
Normal file
Loading…
Reference in a new issue