Skip to content

Commit d76d973

Browse files
authored
docs: Update ADR-0003 (#107)
1 parent 245c304 commit d76d973

3 files changed

Lines changed: 366 additions & 173 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Boolean = [
133133

134134
5. **Alternations**
135135
- Tagged: `[ L1: (a) @x L2: (b) @y ]`
136-
→ Discriminated Union: `{ tag: "L1", x: Node } | { tag: "L2", y: Node }`.
136+
→ Discriminated Union: `{ "$tag": "L1", "$data": { x: Node } } | { "$tag": "L2", "$data": { y: Node } }`.
137137
- Untagged: `[ (a) @x (b) @x ]`
138138
→ Merged Struct: `{ x: Node }`. Captures must be type-compatible across branches.
139139
- Mixed: `[ (a) @x (b) ]` (invalid) - the diagnostics will be reported, but we infer as for untagged

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ for (const stmt of result.statements) {
182182
console.log(`Assignment to ${stmt.$data.target}`);
183183
break;
184184
case "Call":
185-
console.log(`Call to ${stmt.$data.func} with ${stmt.$data.args.length} args`);
185+
console.log(
186+
`Call to ${stmt.$data.func} with ${stmt.$data.args.length} args`,
187+
);
186188
break;
187189
}
188190
}

0 commit comments

Comments
 (0)