mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 00:45:04 +01:00
fix break
This commit is contained in:
parent
0bf9aed35e
commit
1dad80f4c1
6 changed files with 70 additions and 33 deletions
10
src/ast.ts
10
src/ast.ts
|
|
@ -127,19 +127,17 @@ export type ExprIf = {
|
|||
else?: Expr;
|
||||
};
|
||||
|
||||
export type LoopId = number;
|
||||
|
||||
export type ExprLoop = {
|
||||
kind: "loop";
|
||||
body: Expr;
|
||||
loopId: LoopId;
|
||||
};
|
||||
|
||||
export type ExprBreak = {
|
||||
kind: "break";
|
||||
/**
|
||||
* The break target block.
|
||||
* May be any control flow block, labelled from inside out.
|
||||
* TODO: This is not a good solution at all and pretty broken.
|
||||
*/
|
||||
target?: number;
|
||||
target?: LoopId;
|
||||
};
|
||||
|
||||
export type ExprStructLiteral = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue