first commit

This commit is contained in:
Daniel Bulant 2024-02-13 15:06:34 +01:00
commit bfa5f9ef39
4 changed files with 30 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/node_modules
/pnpm-lock.yaml

18
package.json Normal file
View 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
View 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
View file