optinterpreter: set current_node when reducing

This commit is contained in:
Dylan Baker authored and Paolo Bonzini committed 2026-09-22 17:02:23 +02:00
1 parent 1d043a9bd4
commit bf078d152d
3 files changed
+3 -2

No files matched your search

+1
View File
@@ -102,6 +102,7 @@ class OptionInterpreter:
raise mesonlib.MesonException.from_node(str(e), node=self.current_node)
def reduce_single(self, arg: mparser.BaseNode) -> 'TYPE_var':
self.current_node = arg
match arg:
case mparser.ParenthesizedNode(inner=inner):
return self.reduce_single(inner)
@@ -1,7 +1,7 @@
{
"stdout": [
{
"line": "test cases/failing/14 invalid option name/meson_options.txt:1:0: ERROR: \"option\" positional argument \"1\" option names can only contain letters, numbers, and dashes"
"line": "test cases/failing/14 invalid option name/meson_options.txt:1:49: ERROR: \"option\" positional argument \"1\" option names can only contain letters, numbers, and dashes"
}
]
}
@@ -1,7 +1,7 @@
{
"stdout": [
{
"line": "test cases/failing/55 bad option argument/meson_options.txt:1:0: ERROR: \"string option\" got unknown keyword arguments \"value_\" (did you mean \"value\"?)."
"line": "test cases/failing/55 bad option argument/meson_options.txt:1:41: ERROR: \"string option\" got unknown keyword arguments \"value_\" (did you mean \"value\"?)."
}
]
}