No more Refs, no more store, every top level def goes in the store, to update store values use :=

This commit is contained in:
Dustin Swan 2026-02-06 18:06:01 -07:00
parent 31ef279f16
commit 70569dfe48
No known key found for this signature in database
GPG key ID: 30D46587E2100467
9 changed files with 58 additions and 74 deletions

View file

@ -25,6 +25,7 @@ export type Token = (
// Symbols
| { kind: 'colon' }
| { kind: 'colon-equals' }
| { kind: 'semicolon' }
| { kind: 'backslash' }
| { kind: 'pipe' }
@ -214,7 +215,15 @@ export function tokenize(source: string): Token[] {
}
break;
}
case ':': tokens.push({ kind: 'colon', line: startLine, column: startColumn, start }); break;
case ':': {
if (source[i + 1] === '=') {
tokens.push({ kind: 'colon-equals', line: startLine, column: startColumn, start });
advance();
} else {
tokens.push({ kind: 'colon', line: startLine, column: startColumn, start });
}
break;
}
case ';': tokens.push({ kind: 'semicolon', line: startLine, column: startColumn, start }); break;
case '\\': tokens.push({ kind: 'backslash', line: startLine, column: startColumn, start }); break;
case '~': tokens.push({ kind: 'tilde', line: startLine, column: startColumn, start }); break;