diff options
author | Camil Staps | 2016-03-31 23:23:47 +0200 |
---|---|---|
committer | Camil Staps | 2016-03-31 23:23:47 +0200 |
commit | c68e592f23545dc7213c38af351161be2b5abece (patch) | |
tree | 734cc92708fb9072bcedf32cd055f9def03ecc4a /While.icl | |
parent | Parentheses for ArithExpr/BoolExpr toString (diff) |
Diffstat (limited to 'While.icl')
-rw-r--r-- | While.icl | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,7 +5,7 @@ from StdList import hd, last, map, take from StdMisc import abort from StdOverloaded import class +++(..), class toString(..) from StdString import instance +++ {#Char}, instance toString {#Char}, - instance toString Int, instance toString Bool, instance toString Char + instance toString Int, instance toString Char import _SystemArray // Evaluation utilities @@ -91,6 +91,8 @@ where toString (a1 - a2) = a1 <+ "-" <+ a2 toString (a1 * a2) = "(" <+ a1 <+ "*" <+ a2 <+ ")" +instance toString Bool where toString True = "true"; toString False = "false" + instance toString BoolExpr where toString (a1 == a2) = a1 <+ "=" <+ a2 |