Parsing bindings. adding AST pretty printer

This commit is contained in:
Dustin Swan 2026-02-01 00:43:01 -07:00
parent 1fc116f2fe
commit 0f0371461d
No known key found for this signature in database
GPG key ID: 30D46587E2100467
4 changed files with 64 additions and 42 deletions

View file

@ -17,6 +17,7 @@ export type Token =
// Symbols
| { kind: 'equals' }
| { kind: 'colon' }
| { kind: 'semicolon' }
| { kind: 'backslash' }
| { kind: 'pipe' }
| { kind: 'greater-than' }
@ -141,6 +142,7 @@ export function tokenize(source: string): Token[] {
// Symbols
case '=': tokens.push({ kind: 'equals' }); break;
case ':': tokens.push({ kind: 'colon' }); break;
case ';': tokens.push({ kind: 'semicolon' }); break;
case '\\': tokens.push({ kind: 'backslash' }); break;
case '|': tokens.push({ kind: 'pipe' }); break;
// case '<': tokens.push({ kind: 'less-than' }); break;