aboutsummaryrefslogtreecommitdiff
path: root/ast/CC/AST/Source.hs
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-25 21:51:37 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-25 21:51:37 +0200
commit0503dcb2998ab9dcd0f39e6f264f482a3d2cc7f7 (patch)
treedeb942a011451b183a1028a2f0f891d9e09e5107 /ast/CC/AST/Source.hs
parentd5ab8f4939a4af51c7a9e1c2cd73c8352f8345b4 (diff)
Support Let
Diffstat (limited to 'ast/CC/AST/Source.hs')
-rw-r--r--ast/CC/AST/Source.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ast/CC/AST/Source.hs b/ast/CC/AST/Source.hs
index 11b7bc6..e648759 100644
--- a/ast/CC/AST/Source.hs
+++ b/ast/CC/AST/Source.hs
@@ -27,6 +27,7 @@ data Type = TFun Type Type
deriving (Show, Read)
data Expr = Lam SourceRange [(Name, SourceRange)] Expr
+ | Let SourceRange (Name, SourceRange) Expr Expr
| Call SourceRange Expr Expr
| Int SourceRange Int
| Tup SourceRange [Expr]
@@ -43,6 +44,7 @@ instance Pretty Type where
instance HasRange Expr where
range (Lam sr _ _) = sr
+ range (Let sr _ _ _) = sr
range (Call sr _ _) = sr
range (Int sr _) = sr
range (Tup sr _) = sr