diff options
author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-08-22 22:05:40 -0400 |
---|---|---|
committer | Charles Brunet <charles.brunet@optelgroup.com> | 2023-09-11 07:51:17 -0400 |
commit | 3ff3b8abf6f24f676b6c03250ba96a365ae77b03 (patch) | |
tree | 761f3e77d1e0fa3b524e36e52890db5271ebb9cd /mesonbuild | |
parent | 79ed2415e9a50e5181b203790ec057c6229609a3 (diff) | |
download | meson-3ff3b8abf6f24f676b6c03250ba96a365ae77b03.zip meson-3ff3b8abf6f24f676b6c03250ba96a365ae77b03.tar.gz meson-3ff3b8abf6f24f676b6c03250ba96a365ae77b03.tar.bz2 |
parser: more specific error for float numbers
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mparser.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py index 3697d8a..9867c71 100644 --- a/mesonbuild/mparser.py +++ b/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) |