aboutsummaryrefslogtreecommitdiff
path: root/src/Ast.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-09-06 22:22:32 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-09-06 22:22:32 +0100
commitd08042be1e0ae158f124bb6848f5843a804a6544 (patch)
tree71ffa63234c13f3bf7d31fe3c0a3876839cae2e8 /src/Ast.hs
parentf8dfbfc1604aea626a6502b9f6d06ea1299a0cdb (diff)
downloadmicro-lang-hs-d08042be1e0ae158f124bb6848f5843a804a6544.tar.gz
micro-lang-hs-d08042be1e0ae158f124bb6848f5843a804a6544.zip
Assignation
Diffstat (limited to 'src/Ast.hs')
-rw-r--r--src/Ast.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Ast.hs b/src/Ast.hs
index 075b9f8..4f4a2f9 100644
--- a/src/Ast.hs
+++ b/src/Ast.hs
@@ -22,7 +22,7 @@ type FuncParam = (Ident, Type, Bool, SourcePos)
data Expr
= Num Integer SourcePos
| Bool' Bool SourcePos
- | BinOp Op Expr Expr
+ | BinOp Op SourcePos Expr Expr
| Variable Ident SourcePos
| -- v type value private pos
Var Ident Type Expr Bool SourcePos
@@ -34,7 +34,8 @@ data Expr
deriving (Eq, Ord, Show)
data Op
- = Plus
+ = Assign
+ | Plus
| Minus
| Mul
| Div