aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-06-17 00:27:39 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-06-18 23:48:33 +0200
commit7c757dff71c031ae02ecc358a69a213a5db4051a (patch)
tree5e7892f0eaa302749440f53b859ff281a2d2584e /mesonbuild/ast
parent34c28dc92cb4f28e32e633297e4b8a737228aae5 (diff)
downloadmeson-7c757dff71c031ae02ecc358a69a213a5db4051a.zip
meson-7c757dff71c031ae02ecc358a69a213a5db4051a.tar.gz
meson-7c757dff71c031ae02ecc358a69a213a5db4051a.tar.bz2
holders: Fix the remaining code to respect the holder changes
Diffstat (limited to 'mesonbuild/ast')
-rw-r--r--mesonbuild/ast/interpreter.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py
index 26447ce..b9dfc7b 100644
--- a/mesonbuild/ast/interpreter.py
+++ b/mesonbuild/ast/interpreter.py
@@ -76,6 +76,9 @@ class MockRunTarget(MesonInterpreterObject):
ADD_SOURCE = 0
REMOVE_SOURCE = 1
+_T = T.TypeVar('_T')
+_V = T.TypeVar('_V')
+
class AstInterpreter(InterpreterBase):
def __init__(self, source_root: str, subdir: str, subproject: str, visitors: T.Optional[T.List[AstVisitor]] = None):
super().__init__(source_root, subdir, subproject)
@@ -141,6 +144,12 @@ class AstInterpreter(InterpreterBase):
'range': self.func_do_nothing,
})
+ def _unholder_args(self, args: _T, kwargs: _V) -> T.Tuple[_T, _V]:
+ return args, kwargs
+
+ def _holderify(self, res: _T) -> _T:
+ return res
+
def func_do_nothing(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs: T.Dict[str, TYPE_nvar]) -> bool:
return True