tools/pas2c.hs
changeset 7075 6bd7e5ad3f2b
parent 7072 159616c24bb8
child 7134 beb16926ae5c
--- a/tools/pas2c.hs	Sun May 13 21:39:20 2012 +0400
+++ b/tools/pas2c.hs	Sun May 13 21:46:50 2012 +0400
@@ -745,7 +745,7 @@
 expr2C (CharCode a) = do
     modify(\s -> s{lastType = BTChar})
     return $ quotes $ text "\\x" <> text (showHex (read a) "")
-expr2C (HexCharCode a) = return $ quotes $ text "\\x" <> text (map toLower a)
+expr2C (HexCharCode a) = if length a <= 2 then return $ quotes $ text "\\x" <> text (map toLower a) else expr2C $ HexNumber a
 expr2C (SetExpression ids) = mapM (id2C IOLookup) ids >>= return . parens . hcat . punctuate (text " | ")
 
 expr2C (BuiltInFunCall [e] (SimpleReference (Identifier "low" _))) = do