summaryrefslogtreecommitdiff
path: root/ast.hs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-02-02 21:00:10 +0100
committertomsmeding <tom.smeding@gmail.com>2017-02-02 21:00:10 +0100
commitdd1a2323e743df5ca3109bae6e213cd7b02dddee (patch)
treea064a9197de268a934a2fb7564df8424d8882541 /ast.hs
parent9e67d68574bf4b78451469d5e149cfd95b0ec9f6 (diff)
Support 1U literals
Diffstat (limited to 'ast.hs')
-rw-r--r--ast.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ast.hs b/ast.hs
index b1b31b7..2f40b84 100644
--- a/ast.hs
+++ b/ast.hs
@@ -38,6 +38,7 @@ data Type = TypeInt Int
deriving (Show, Eq)
data Literal = LitInt Integer
+ | LitUInt Integer
| LitFloat Double
| LitString String
| LitVar Name
@@ -128,6 +129,7 @@ instance PShow Type where
instance PShow Literal where
pshow (LitInt i) = pshow i
+ pshow (LitUInt i) = pshow i ++ "U"
pshow (LitFloat x) = pshow x
pshow (LitString s) = pshow s
pshow (LitVar n) = n