From 9b81056d1d003be5c292e45faa7c432fc559bcee Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Wed, 5 Jun 2024 19:43:19 -0400 Subject: [PATCH] Add more recognized tokens --- src/parser2.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/parser2.ts b/src/parser2.ts index 163ed25..83ca5fe 100644 --- a/src/parser2.ts +++ b/src/parser2.ts @@ -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], ];