aboutsummaryrefslogtreecommitdiff
path: root/nodes.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2012-12-26 23:37:41 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2012-12-26 23:37:41 +0200
commit4dbe7f6f34149502531c60587b565bdb3314b048 (patch)
treea32ae123dfc2b8f7a92ab6032eb7ce071c84b0c0 /nodes.py
parentbc249bc697aad332c70635dc78c77737be7577bb (diff)
downloadmeson-4dbe7f6f34149502531c60587b565bdb3314b048.zip
meson-4dbe7f6f34149502531c60587b565bdb3314b048.tar.gz
meson-4dbe7f6f34149502531c60587b565bdb3314b048.tar.bz2
Can call functions and print text.
Diffstat (limited to 'nodes.py')
-rw-r--r--nodes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nodes.py b/nodes.py
index af52a30..6305d31 100644
--- a/nodes.py
+++ b/nodes.py
@@ -48,6 +48,9 @@ class StringStatement(Statement):
assert(type(value) == type(''))
Statement.__init__(self, lineno)
self.value = value
+
+ def get_string(self):
+ return self.value
class FunctionCall(Statement):
def __init__(self, func_name, arguments, lineno):
@@ -90,6 +93,9 @@ class Arguments(Statement):
def prepend(self, statement):
self.arguments = [statement] + self.arguments
+ def __len__(self):
+ return len(self.arguments)
+
def statement_from_expression(expr):
if isinstance(expr, AtomExpression):
return AtomStatement(expr.value, expr.lineno())