diff options
author | Camil Staps | 2017-07-28 11:54:40 +0200 |
---|---|---|
committer | Camil Staps | 2017-07-28 11:55:23 +0200 |
commit | 1703085b25fa82459e306737ae88ee6fb0ece910 (patch) | |
tree | 8b86ce7d6e2892b7dc328153373b59a36c129ba5 /Sil/Syntax.icl | |
parent | Optimise: remove unreachacble ABC-code (diff) |
Resolve #1: implement lists (tuples have been done earlier)
Diffstat (limited to 'Sil/Syntax.icl')
-rw-r--r-- | Sil/Syntax.icl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Sil/Syntax.icl b/Sil/Syntax.icl index cc5c3ba..53384b3 100644 --- a/Sil/Syntax.icl +++ b/Sil/Syntax.icl @@ -32,7 +32,10 @@ where toString (BuiltinApp op e) = op <+ "(" <+ e <+ ")" toString (BuiltinApp2 e1 op e2) = "(" <+ e1 <+ ") " <+ op <+ " (" <+ e2 <+ ")" toString (Tuple _ es) = "(" <+ printersperse ", " es <+ ")" - toString (Field f e) = e <+ "." <+ f + toString (List (Just t) []) = "[" <+ t <+ "]" + toString (List (Just t) es) = "[" <+ t <+ ":" <+ printersperse ", " es <+ "]" + toString (List Nothing es) = "[" <+ printersperse ", " es <+ "]" + toString (Field f e) = "(" <+ e <+ ")." <+ f instance toString Op1 where @@ -49,6 +52,7 @@ where toString Equals = "==" toString LogOr = "||" toString LogAnd = "&&" + toString Cons = ":" instance toString Literal where |