aboutsummaryrefslogtreecommitdiff
path: root/src/Parser.hs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-10-16 14:24:46 +0100
committerAkshay <[email protected]>2020-10-16 14:24:46 +0100
commitb19a4a35db4cd951c52e179f3340518c9e2dcc1e (patch)
tree6d3d840a995d0467577ca645f5838a16d78aa3d6 /src/Parser.hs
parent684e09298b8453ee56571d8a225e11d7c57e3746 (diff)
add initial support for variable definition
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 115203b..a7f5571 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -22,6 +22,7 @@ data Expr = List [Expr]
22 | FloatLiteral Double 22 | FloatLiteral Double
23 | BoolLiteral Bool 23 | BoolLiteral Bool
24 | Id String 24 | Id String
25 | NoReturn
25 deriving (Eq) 26 deriving (Eq)
26 27
27-- backslash double quote escapes a quote inside strings 28-- backslash double quote escapes a quote inside strings
@@ -127,3 +128,4 @@ instance Show Expr where
127 show (BoolLiteral True) = "#t" 128 show (BoolLiteral True) = "#t"
128 show (BoolLiteral False) = "#f" 129 show (BoolLiteral False) = "#f"
129 show (Id i) = i 130 show (Id i) = i
131 show NoReturn = ";;; environment extension"