haku - first draft
This commit is contained in:
parent
2a68cfbf63
commit
d813675d47
5 changed files with 1205 additions and 0 deletions
10
static/syntax/ebnf.json
Normal file
10
static/syntax/ebnf.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"patterns": [
|
||||
{ "regex": "[a-zA-Z_][a-zA-Z0-9_]*", "is": "keyword2" },
|
||||
{ "regex": "\"(\\\\\"|[^\"])*\"", "is": "string" },
|
||||
{ "regex": "'('|[^'])*'", "is": "string" },
|
||||
{ "regex": "[+*?=|,-]", "is": "operator" }
|
||||
],
|
||||
"keywords": {
|
||||
}
|
||||
}
|
26
static/syntax/haku.json
Normal file
26
static/syntax/haku.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"patterns": [
|
||||
{ "regex": ";.*", "is": "comment" },
|
||||
{ "regex": "[0-9]+", "is": "literal" },
|
||||
{
|
||||
"regex": "\\((fn)\\s*\\(.*?\\)",
|
||||
"is": {
|
||||
"default": "default",
|
||||
"captures": ["keyword1"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"regex": "\\(([a-zA-Z0-9+~!@$%^&*=<>+?/.,:\\\\|-]+)",
|
||||
"is": {
|
||||
"default": "default",
|
||||
"captures": ["function"]
|
||||
}
|
||||
},
|
||||
{ "regex": "[a-zA-Z0-9+~!@$%^&*=<>+?/.,:\\\\|-]+", "is": "identifier" }
|
||||
],
|
||||
"keywords": {
|
||||
"def": { "into": "keyword1" },
|
||||
"if": { "into": "keyword1" }
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue