diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-09-02 12:57:29 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-09-02 12:57:29 +0100 |
commit | f66874f1f5066e57ef5761cd7c87b5d498fd89b6 (patch) | |
tree | 0edef26cda608a79c92f9c64c847f214ba877f9c /src/Ast.hs | |
parent | a5633563e9bb579ed10cb7d6d43676485c13b1fb (diff) | |
download | micro-lang-hs-f66874f1f5066e57ef5761cd7c87b5d498fd89b6.tar.gz micro-lang-hs-f66874f1f5066e57ef5761cd7c87b5d498fd89b6.zip |
Private variables
Diffstat (limited to 'src/Ast.hs')
-rw-r--r-- | src/Ast.hs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -17,14 +17,15 @@ instance Show Type where showList :: [Type] -> String showList xs = intercalate ", " $ fmap show xs -type FuncParam = (Ident, Type, SourcePos) +type FuncParam = (Ident, Type, Bool, SourcePos) data Expr = Num Integer SourcePos | Bool' Bool SourcePos | BinOp Op Expr Expr | Variable Ident SourcePos - | Var Ident Type Expr SourcePos + | -- v type value private pos + Var Ident Type Expr Bool SourcePos | -- fn [params] return body private anomyous pos Func Ident [FuncParam] (Maybe Type) [Expr] Bool Bool SourcePos | Call Expr [Expr] SourcePos @@ -41,4 +42,4 @@ data Op toFuncType :: [FuncParam] -> Maybe Type -> Type toFuncType params rtyp = - FuncType (map (\(_, t, _) -> t) params) rtyp + FuncType (map (\(_, t, _, _) -> t) params) rtyp |