Commits

Tobias Dammers committed ad5eb3d

Fixed JSL output for switch

  • Participants
  • Parent commits 5a3e685

Comments (0)

Files changed (1)

File hpaco-lib/Text/HPaco/Writers/JsonLisp.hs

         LetStatement identifier expr stmt -> toJSON $ ("let", identifier, expr, stmt)
         ForStatement iter identifier expr stmt -> toJSON $ "for" <:> iter <:> identifier <:> expr <:> [stmt]
         SwitchStatement masterExpr branches -> 
-            toJSON $ "switch" <:> [ ("case", e, s) | (e,s) <- branches ]
+            toJSON $ "switch" <:> masterExpr <:> [ ("case", e, s) | (e,s) <- branches ]
         CallStatement identifier -> toJSON $ ("calldef", identifier)
         SourcePositionStatement fn ln -> Null
         NullStatement -> toJSON ["nop"]