working on syntax highlighting. basic prototype working
This commit is contained in:
parent
a3bf799e87
commit
29ee46c071
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
node_modules
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
|
|
@ -250,17 +250,16 @@ reserved<term> { @specialize[@name={term}]<Word, term> }
|
||||||
|
|
||||||
silent<term> { @specialize<Word, term> }
|
silent<term> { @specialize<Word, term> }
|
||||||
|
|
||||||
Keyword { ":" Word }
|
|
||||||
|
|
||||||
Boolean { reserved<"true"> | reserved<"false"> }
|
Boolean { reserved<"true"> | reserved<"false"> }
|
||||||
|
|
||||||
Nil { silent<"nil"> }
|
Nil { silent<"nil"> }
|
||||||
|
|
||||||
@tokens {
|
@tokens {
|
||||||
Word { $[a-z] $[a-zA-Z_\-?/!]* }
|
Word { $[a-z] $[a-zA-Z_\-?/!]* }
|
||||||
space { $[ \t\r]+ }
|
Keyword { ":" Word }
|
||||||
Comment { "&" ![\n]* }
|
Comment { "&" ![\n]* }
|
||||||
String { '"' (!["\\] | "\\" _)* '"' }
|
String { '"' (!["\\] | "\\" _)* '"' }
|
||||||
|
space { $[ \t\r]+ }
|
||||||
int { $[1-9]$[0-9]* | "0" }
|
int { $[1-9]$[0-9]* | "0" }
|
||||||
float { ("0" | int ) "." $[0-9]+}
|
float { ("0" | int ) "." $[0-9]+}
|
||||||
Number { "-"? (int | float) }
|
Number { "-"? (int | float) }
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
||||||
export const
|
export const
|
||||||
Script = 1,
|
Comment = 1,
|
||||||
Boolean = 2,
|
Script = 2,
|
||||||
Word = 3,
|
Boolean = 3,
|
||||||
Nil = 6,
|
Word = 4,
|
||||||
String = 7,
|
Nil = 7,
|
||||||
Number = 8,
|
String = 8,
|
||||||
Keyword = 9,
|
Number = 9,
|
||||||
Tuple = 10,
|
Keyword = 10,
|
||||||
List = 11,
|
Tuple = 11,
|
||||||
Splat = 12,
|
List = 12,
|
||||||
Set = 13,
|
Splat = 13,
|
||||||
Dict = 14,
|
Set = 14,
|
||||||
Struct = 15,
|
Dict = 15,
|
||||||
Synthetic = 16,
|
Synthetic = 16,
|
||||||
Args = 17,
|
Args = 17,
|
||||||
Placeholder = 18,
|
Placeholder = 18,
|
||||||
|
@ -22,9 +22,9 @@ export const
|
||||||
Pattern = 22,
|
Pattern = 22,
|
||||||
List_Pattern = 23,
|
List_Pattern = 23,
|
||||||
Splattern = 24,
|
Splattern = 24,
|
||||||
Dict_Pattern = 25,
|
Ignored = 25,
|
||||||
Assoc_Pattern = 26,
|
Dict_Pattern = 26,
|
||||||
Struct_Pattern = 27,
|
Assoc_Pattern = 27,
|
||||||
Recur = 28,
|
Recur = 28,
|
||||||
Block = 29,
|
Block = 29,
|
||||||
If = 30,
|
If = 30,
|
||||||
|
@ -34,14 +34,15 @@ export const
|
||||||
Else = 34,
|
Else = 34,
|
||||||
When = 35,
|
When = 35,
|
||||||
When_Clause = 36,
|
When_Clause = 36,
|
||||||
Loop = 37,
|
Do = 37,
|
||||||
Fn_Clauses = 38,
|
Loop = 38,
|
||||||
Repeat = 39,
|
Fn_Clauses = 39,
|
||||||
Each = 40,
|
Repeat = 40,
|
||||||
Let = 41,
|
Let = 41,
|
||||||
Ref = 42,
|
Ref = 42,
|
||||||
Fn_Named = 43,
|
Fn_Named = 43,
|
||||||
Fn_Compound = 44,
|
Fn_Compound = 44,
|
||||||
Import = 45,
|
Import = 45,
|
||||||
Use = 46,
|
Use = 46,
|
||||||
Ns = 47
|
Ns = 47,
|
||||||
|
Test = 48
|
||||||
|
|
Loading…
Reference in New Issue
Block a user