Pas2C: Add support for char + ansistring (for real this time)
authorWuzzy <Wuzzy2@mail.ru>
Tue, 24 Apr 2018 21:49:12 +0200
changeset 13349 4f9108f82879
parent 13348 93325e13d329
child 13350 e54d6db06f35
child 13351 e461deddc942
Pas2C: Add support for char + ansistring (for real this time)
tools/pas2c/Pas2C.hs
--- a/tools/pas2c/Pas2C.hs	Tue Apr 24 20:30:15 2018 +0200
+++ b/tools/pas2c/Pas2C.hs	Tue Apr 24 21:49:12 2018 +0200
@@ -958,6 +958,7 @@
     case (op2C op, t1, t2) of
         ("+", BTAString, BTAString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strconcatA" (fff t1 t2 BTString))
         ("+", BTAString, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strappendA" (fff t1 t2  BTAString))
+        ("+", BTChar, BTAString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strprependA" (fff t1 t2  BTAString))
         ("!=", BTAString, BTAString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strncompareA" (fff t1 t2  BTBool))
         (_, BTAString, _) -> error $ "unhandled bin op with ansistring on the left side: " ++ show bop
         (_, _, BTAString) -> error $ "unhandled bin op with ansistring on the right side: " ++ show bop