diff options
Diffstat (limited to 'std')
-rw-r--r-- | std/fundamental/ast.pk | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/std/fundamental/ast.pk b/std/fundamental/ast.pk index 25bdc02..202c7d4 100644 --- a/std/fundamental/ast.pk +++ b/std/fundamental/ast.pk @@ -25,8 +25,8 @@ pub type FuncDecl = struct public: bool effect: Option[str] id: str - generics: list[struct[name: str, kind: Option[Type]]] - params: list[struct[name: str, kind: Type]] + generics: list[struct[id: str, kind: Option[Type]]] + params: list[struct[id: str, kind: Type]] kind: Type body: list[Expr] pub type TypeDecl = struct @@ -38,8 +38,8 @@ pub type Import = struct imports: list[str] alias: Option[str] pub type Module = struct - name: str - body: list[ref Expr] + id: str + body: list[Expr] pub type Call = struct id: str @@ -94,9 +94,10 @@ pub type Signature = struct # todo: generics kind: Option[Type] pub type Pattern = union Ident: str - Struct: struct[name: str, params: list[]] + Number: int, Float: float, Char: char, String: str + Struct: struct[name: str, params: list[Pattern]] Tuple: list[Pattern] - List + List: list[Pattern] pub type CondBranch = struct cond: Expr body: list[Expr] |