Parsing bindings. adding AST pretty printer
This commit is contained in:
parent
1fc116f2fe
commit
0f0371461d
4 changed files with 64 additions and 42 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue