Commit 98216596 authored by Stefan Behnel's avatar Stefan Behnel

fix copy+paste error messages

parent 1640ce78
...@@ -990,7 +990,7 @@ class TransformBuiltinMethods(EnvTransform): ...@@ -990,7 +990,7 @@ class TransformBuiltinMethods(EnvTransform):
if function: if function:
if function == u'cast': if function == u'cast':
if len(node.args) != 2: if len(node.args) != 2:
error(node.function.pos, u"cast takes exactly two arguments") error(node.function.pos, u"cast() takes exactly two arguments")
else: else:
type = node.args[0].analyse_as_type(self.env_stack[-1]) type = node.args[0].analyse_as_type(self.env_stack[-1])
if type: if type:
...@@ -999,7 +999,7 @@ class TransformBuiltinMethods(EnvTransform): ...@@ -999,7 +999,7 @@ class TransformBuiltinMethods(EnvTransform):
error(node.args[0].pos, "Not a type") error(node.args[0].pos, "Not a type")
elif function == u'sizeof': elif function == u'sizeof':
if len(node.args) != 1: if len(node.args) != 1:
error(node.function.pos, u"sizeof takes exactly one argument" % function) error(node.function.pos, u"sizeof() takes exactly one argument" % function)
else: else:
type = node.args[0].analyse_as_type(self.env_stack[-1]) type = node.args[0].analyse_as_type(self.env_stack[-1])
if type: if type:
...@@ -1008,23 +1008,23 @@ class TransformBuiltinMethods(EnvTransform): ...@@ -1008,23 +1008,23 @@ class TransformBuiltinMethods(EnvTransform):
node = SizeofVarNode(node.function.pos, operand=node.args[0]) node = SizeofVarNode(node.function.pos, operand=node.args[0])
elif function == 'typeof': elif function == 'typeof':
if len(node.args) != 1: if len(node.args) != 1:
error(node.function.pos, u"sizeof takes exactly one argument" % function) error(node.function.pos, u"typeof() takes exactly one argument" % function)
else: else:
node = TypeofNode(node.function.pos, operand=node.args[0]) node = TypeofNode(node.function.pos, operand=node.args[0])
elif function == 'address': elif function == 'address':
if len(node.args) != 1: if len(node.args) != 1:
error(node.function.pos, u"sizeof takes exactly one argument" % function) error(node.function.pos, u"address() takes exactly one argument" % function)
else: else:
node = AmpersandNode(node.function.pos, operand=node.args[0]) node = AmpersandNode(node.function.pos, operand=node.args[0])
elif function == 'cmod': elif function == 'cmod':
if len(node.args) != 2: if len(node.args) != 2:
error(node.function.pos, u"cmod takes exactly one argument" % function) error(node.function.pos, u"cmod() takes exactly one argument" % function)
else: else:
node = binop_node(node.function.pos, '%', node.args[0], node.args[1]) node = binop_node(node.function.pos, '%', node.args[0], node.args[1])
node.cdivision = True node.cdivision = True
elif function == 'cdiv': elif function == 'cdiv':
if len(node.args) != 2: if len(node.args) != 2:
error(node.function.pos, u"cmod takes exactly one argument" % function) error(node.function.pos, u"cdiv() takes exactly one argument" % function)
else: else:
node = binop_node(node.function.pos, '/', node.args[0], node.args[1]) node = binop_node(node.function.pos, '/', node.args[0], node.args[1])
node.cdivision = True node.cdivision = True
......
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