Commit 4b25492f authored by Stefan Behnel's avatar Stefan Behnel

cleanup and provisionary Py3 fix

parent 825a2cd3
...@@ -502,13 +502,8 @@ def p_name(s, name): ...@@ -502,13 +502,8 @@ def p_name(s, name):
return ExprNodes.LongNode(pos, value = rep) return ExprNodes.LongNode(pos, value = rep)
elif isinstance(value, float): elif isinstance(value, float):
return ExprNodes.FloatNode(pos, value = rep) return ExprNodes.FloatNode(pos, value = rep)
elif isinstance(value, str):
sval = Utils.EncodedString(rep[1:-1])
sval.encoding = value.encoding
return ExprNodes.StringNode(pos, value = sval)
elif isinstance(value, unicode): elif isinstance(value, unicode):
sval = Utils.EncodedString(rep[2:-1]) return ExprNodes.StringNode(pos, value = value)
return ExprNodes.StringNode(pos, value = sval)
else: else:
error(pos, "Invalid type for compile-time constant: %s" error(pos, "Invalid type for compile-time constant: %s"
% value.__class__.__name__) % value.__class__.__name__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment