parser: more specific error for float numbers

pull/12152/head
Charles Brunet 1 year ago
parent 79ed2415e9
commit 3ff3b8abf6
  1. 3
      mesonbuild/mparser.py

@ -863,6 +863,9 @@ class Parser:
def method_call(self, source_object: BaseNode) -> MethodNode:
methodname = self.e9()
if not isinstance(methodname, IdNode):
if isinstance(source_object, NumberNode) and isinstance(methodname, NumberNode):
raise ParseException('meson does not support float numbers',
self.getline(), source_object.lineno, source_object.colno)
raise ParseException('Method name must be plain id',
self.getline(), self.current.lineno, self.current.colno)
assert isinstance(methodname.value, str)

Loading…
Cancel
Save