diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-19 20:18:30 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-19 20:18:30 +0200 |
commit | 7ed7219d9d937103c9d6760dfdcd7c6d895c1745 (patch) | |
tree | 1750273eb7b69135d626632946020124aff69a98 /mesonbuild/astinterpreter.py | |
parent | 0a31afd672f10d1d996fca1915551b647b8489e2 (diff) | |
download | meson-7ed7219d9d937103c9d6760dfdcd7c6d895c1745.zip meson-7ed7219d9d937103c9d6760dfdcd7c6d895c1745.tar.gz meson-7ed7219d9d937103c9d6760dfdcd7c6d895c1745.tar.bz2 |
Moved functions to base enough to get the base sample project parsed.
Diffstat (limited to 'mesonbuild/astinterpreter.py')
-rw-r--r-- | mesonbuild/astinterpreter.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mesonbuild/astinterpreter.py b/mesonbuild/astinterpreter.py index 7e221d1..d0d5591 100644 --- a/mesonbuild/astinterpreter.py +++ b/mesonbuild/astinterpreter.py @@ -15,12 +15,26 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool. -from . import interpreterbase +from . import interpreterbase, mlog + +class MockExecutable(interpreterbase.InterpreterObject): + pass class AstInterpreter(interpreterbase.InterpreterBase): def __init__(self, source_root, subdir): super().__init__(source_root, subdir) + self.funcs.update({'executable': self.func_executable, + }) + + def func_executable(self, *args, **kwargs): + return MockExecutable() def dump(self): self.load_root_meson_file() - print('AST here')
\ No newline at end of file + self.sanity_check_ast() + self.parse_project() + self.run() + print('AST here') + + def unknown_function_called(self, func_name): + mlog.warning('Unknown function called: ' + func_name) |