aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-04-22 00:51:25 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-04-22 00:51:25 +0300
commitbf6293771115f129d661e8a84d533ff270e1daf6 (patch)
tree49f4aa100aaf34c3bc83aaa1c5f63edc724501eb /interpreter.py
parent140f30470b79d2adeef2ea7986ecca0f5f24da76 (diff)
downloadmeson-bf6293771115f129d661e8a84d533ff270e1daf6.zip
meson-bf6293771115f129d661e8a84d533ff270e1daf6.tar.gz
meson-bf6293771115f129d661e8a84d533ff270e1daf6.tar.bz2
Can extract compiler ID string.
Diffstat (limited to 'interpreter.py')
-rwxr-xr-xinterpreter.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/interpreter.py b/interpreter.py
index e788c98..49fcf82 100755
--- a/interpreter.py
+++ b/interpreter.py
@@ -500,7 +500,12 @@ class CompilerHolder(InterpreterObject):
def __init__(self, compiler):
InterpreterObject.__init__(self)
self.compiler = compiler
- self.methods.update({'compiles': self.compiles_method})
+ self.methods.update({'compiles': self.compiles_method,
+ 'get_id': self.get_id_method,
+ })
+
+ def get_id_method(self, args, kwargs):
+ return self.compiler.get_id()
def compiles_method(self, args, kwargs):
if len(args) != 1:
@@ -665,7 +670,7 @@ class Interpreter():
print('Project name is "%s".' % self.build.project)
self.add_languages(node, args[1:])
- def func_message(self, node, args):
+ def func_message(self, node, args, kwargs):
self.validate_arguments(args, 1, [str])
print('Message: %s' % args[0])
@@ -874,6 +879,7 @@ class Interpreter():
if isinstance(value, InterpreterObject) or \
isinstance(value, dependencies.Dependency) or\
isinstance(value, nodes.StringStatement) or\
+ isinstance(value, str) or\
isinstance(value, nodes.BoolStatement) or\
isinstance(value, nodes.IntStatement) or\
isinstance(value, list):