diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-22 14:54:22 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-22 16:41:25 +0100 |
commit | e089eb7665ca9dfb28e740829652add666f4a2f0 (patch) | |
tree | 250ce11143b55d914f96ae427059a49f5ff76635 /mesonbuild | |
parent | 8dd9b44831ec6b8de1c633ad5d366f3dea2df2cd (diff) | |
download | meson-e089eb7665ca9dfb28e740829652add666f4a2f0.tar.gz |
Fixed line and column numbers for dict and array nodes
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mparser.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py index 845a1a115..ec188372d 100644 --- a/mesonbuild/mparser.py +++ b/mesonbuild/mparser.py @@ -262,17 +262,17 @@ class BreakNode(ElementaryNode): pass class ArrayNode(BaseNode): - def __init__(self, args): + def __init__(self, args, lineno, colno): self.subdir = args.subdir - self.lineno = args.lineno - self.colno = args.colno + self.lineno = lineno + self.colno = colno self.args = args class DictNode(BaseNode): - def __init__(self, args): + def __init__(self, args, lineno, colno): self.subdir = args.subdir - self.lineno = args.lineno - self.colno = args.colno + self.lineno = lineno + self.colno = colno self.args = args class EmptyNode(BaseNode): @@ -638,11 +638,11 @@ class Parser: elif self.accept('lbracket'): args = self.args() self.block_expect('rbracket', block_start) - return ArrayNode(args) + return ArrayNode(args, block_start.lineno, block_start.colno) elif self.accept('lcurl'): key_values = self.key_values() self.block_expect('rcurl', block_start) - return DictNode(key_values) + return DictNode(key_values, block_start.lineno, block_start.colno) else: return self.e9() |