|
|
@ -1054,7 +1054,7 @@ class Interpreter(): |
|
|
|
code = open(absname).read() |
|
|
|
code = open(absname).read() |
|
|
|
assert(isinstance(code, str)) |
|
|
|
assert(isinstance(code, str)) |
|
|
|
try: |
|
|
|
try: |
|
|
|
codeblock = mparser.build_ast(code) |
|
|
|
codeblock = mparser2.Parser(code).parse() |
|
|
|
except coredata.MesonException as me: |
|
|
|
except coredata.MesonException as me: |
|
|
|
me.file = buildfilename |
|
|
|
me.file = buildfilename |
|
|
|
raise me |
|
|
|
raise me |
|
|
@ -1273,16 +1273,16 @@ class Interpreter(): |
|
|
|
return templ |
|
|
|
return templ |
|
|
|
|
|
|
|
|
|
|
|
def method_call(self, node): |
|
|
|
def method_call(self, node): |
|
|
|
invokable = node.invokable |
|
|
|
invokable = node.source_object |
|
|
|
if isinstance(invokable, mparser2.IdNode): |
|
|
|
if isinstance(invokable, mparser2.IdNode): |
|
|
|
object_name = invokable.value |
|
|
|
object_name = invokable.value |
|
|
|
obj = self.get_variable(object_name) |
|
|
|
obj = self.get_variable(object_name) |
|
|
|
else: |
|
|
|
else: |
|
|
|
obj = self.evaluate_statement(invokable) |
|
|
|
obj = self.evaluate_statement(invokable) |
|
|
|
method_name = node.method_name.get_value() |
|
|
|
method_name = node.name |
|
|
|
if method_name == 'extract_objects' and self.environment.coredata.unity: |
|
|
|
if method_name == 'extract_objects' and self.environment.coredata.unity: |
|
|
|
raise InterpreterException('Single object files can not be extracted in Unity builds.') |
|
|
|
raise InterpreterException('Single object files can not be extracted in Unity builds.') |
|
|
|
args = node.arguments |
|
|
|
args = node.args |
|
|
|
if isinstance(obj, nodes.StringStatement): |
|
|
|
if isinstance(obj, nodes.StringStatement): |
|
|
|
obj = obj.get_value() |
|
|
|
obj = obj.get_value() |
|
|
|
if isinstance(obj, str): |
|
|
|
if isinstance(obj, str): |
|
|
|