Commits

Tobias Dammers  committed ff1e87e

Ternary operator passes for JsonLisp

  • Participants
  • Parent commits e453bd1

Comments (0)

Files changed (1)

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

         EscapeExpression EscapeHTML x -> writeWithHead "html" [x]
         EscapeExpression EscapeURL x -> writeWithHead "urlencode" [x]
         FunctionCallExpression fn args -> writeWithHead "call" (fn:args)
+        TernaryExpression expr true false -> writeList [ write $ StringLiteral "if", write expr, write true, write false ]
         BinaryExpression (Flipped op) lhs rhs -> writeExpression $ BinaryExpression op rhs lhs
         BinaryExpression op lhs rhs ->
             let optk = (binaryOperatorToken op) in