aboutsummaryrefslogtreecommitdiff
path: root/std/fundamental/ast.pk
diff options
context:
space:
mode:
Diffstat (limited to 'std/fundamental/ast.pk')
-rw-r--r--std/fundamental/ast.pk13
1 files changed, 3 insertions, 10 deletions
diff --git a/std/fundamental/ast.pk b/std/fundamental/ast.pk
index 202c7d4..0529cbd 100644
--- a/std/fundamental/ast.pk
+++ b/std/fundamental/ast.pk
@@ -45,15 +45,15 @@ pub type Call = struct
id: str
params: list[Expr]
pub type Cond = struct
- branches: list[CondBranch]
+ branches: list[struct[cond: Expr, body: list[Expr]]]
else_body: Option[list[Expr]]
pub type Try = struct
- body: ref Expr
+ body: list[Expr]
catches: list[struct[exceptions: list[str], body: list[Expr]]]
finally_body: Option[list[Expr]]
pub type Match = struct
item: ref Expr
- branches: list[MatchBranch]
+ branches: list[struct[pattern: Pattern, guard: Option[Expr], body: list[Expr]]]
pub type Block = struct
id: Option[str]
body: list[Expr]
@@ -98,13 +98,6 @@ pub type Pattern = union
Struct: struct[name: str, params: list[Pattern]]
Tuple: list[Pattern]
List: list[Pattern]
-pub type CondBranch = struct
- cond: Expr
- body: list[Expr]
-pub type MatchBranch = struct
- pattern: Pattern
- guard: Option[Expr]
- body: Expr
# the second style of union. A union of literal types, no names.
pub type Expr = union