Add more recognized tokens

This commit is contained in:
Tangent Wantwight 2024-06-05 19:43:19 -04:00
parent 618de2ac99
commit 9b81056d1d

View file

@ -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],
];