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

@ -2,7 +2,6 @@ import type { Value } from './types';
// Literals and Variables
export type Literal = {
kind: 'literal'
value: Value
@ -160,6 +159,15 @@ export type Import = {
start: number
}
export type Rebind = {
kind: 'rebind'
target: AST
value: AST
line: number
column: number
start: number
}
export type AST =
| Literal
| Variable
@ -176,6 +184,7 @@ export type AST =
| Definition
| TypeDef
| Import
| Rebind
export function prettyPrint(ast: AST, indent = 0): string {
const i = ' '.repeat(indent);