Add more recognized tokens
This commit is contained in:
parent
618de2ac99
commit
9b81056d1d
1 changed files with 8 additions and 0 deletions
|
@ -59,6 +59,14 @@ type Token = [TokenType, string, number];
|
|||
const Tokens: [TokenType, RegExp][] = [
|
||||
["newline", /(\n)/y],
|
||||
["whitespace", /([^\S\n]+)/y],
|
||||
["semicolon", /(;)/y],
|
||||
["{", /(\{)/y],
|
||||
["}", /(\})/y],
|
||||
["[", /(\[)/y],
|
||||
["]", /(\])/y],
|
||||
["quote", /(")/y],
|
||||
["backslash", /(\\)/y],
|
||||
["comment", /(\#)/y],
|
||||
["text", /([^\s\\;\[\]]+)/y],
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue