diff options
author | tomsmeding <tom.smeding@gmail.com> | 2019-11-22 22:36:21 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2019-11-22 22:36:21 +0100 |
commit | b6b6b86128da3c7f7ea86a051e476dd67bb37a92 (patch) | |
tree | a599efa91357e64e7bfc2d43fcac9dafff771209 | |
parent | eb424bfc184132c0f8075e706ffb0494ef80b2b3 (diff) |
Properly parse cond in CompilerMacros
-rw-r--r-- | CompilerMacros.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CompilerMacros.hs b/CompilerMacros.hs index ce7974c..a2d9600 100644 --- a/CompilerMacros.hs +++ b/CompilerMacros.hs @@ -40,6 +40,7 @@ process (VList (VName "let" : _)) = error "Invalid 'let' syntax: Invalid argumen process (VList [VName "cond", defval]) = process defval process (VList (VName "cond" : cond1 : val1 : rest)) = process (VList [VName "if", cond1, val1, VList (VName "cond" : rest)]) +process (VList [VName "cond"]) = error "Invalid 'cond' syntax: Even number of arguments" process (VList values) = VList (map process values) |