diff options
| author | Matthew Hall <hallmatthew314@gmail.com> | 2023-02-18 00:11:29 +1300 |
|---|---|---|
| committer | Matthew Hall <hallmatthew314@gmail.com> | 2023-02-18 00:11:29 +1300 |
| commit | 69276220df02d2c226021d79ee4a4fd173ae85ee (patch) | |
| tree | a53bf65216fcbc0ed11d19e90daf9a4be31d6019 /DSL/Types.hs | |
| parent | c8e97a9e6ebfefec0db5bc51bd095b3d10dfd078 (diff) | |
String literals, fizzbuzz, other tweaks
Diffstat (limited to 'DSL/Types.hs')
| -rw-r--r-- | DSL/Types.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/DSL/Types.hs b/DSL/Types.hs index 8d59a06..bb1f862 100644 --- a/DSL/Types.hs +++ b/DSL/Types.hs @@ -5,12 +5,14 @@ import DSL.BaseParsers (Parser(..)) data StackData = StackInt Integer | StackBool Bool + | StackString String deriving (Eq) instance Show StackData where show (StackInt x) = show x show (StackBool True) = "true" show (StackBool False) = "false" + show (StackString s) = show s type TypeCheck = StackData -> Bool @@ -70,8 +72,9 @@ data TokenTag | T_WHILE | T_DO | T_END - | T_BOOL_LITERAL | T_INT_LITERAL + | T_BOOL_LITERAL + | T_STRING_LITERAL | T_INTRINSIC Intrinsic deriving (Show, Eq) |
