summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2007-09-02 23:02:06 -0400
committerSøren Sandmann <sandmann@redhat.com>2007-09-02 23:02:06 -0400
commit873ebfa036530eef7e5077169ae5e2f48704a52e (patch)
treef4d80cda06d34cb67419a49274e1f7891eee64e0 /ast.c
parent6364b07e5793a9266977f7ac4bd957cd2bd77191 (diff)
Initial support for dot expressions and method calls
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index ed98ef4..373d79e 100644
--- a/ast.c
+++ b/ast.c
@@ -319,6 +319,18 @@ ast_expression_new_new (const char *type,
}
ast_expression_t *
+ast_expression_new_dot (ast_expression_t *left,
+ const char *name)
+{
+ ast_expression_t *expr = expression_new (AST_DOT_EXPRESSION);
+
+ expr->dot.left = left;
+ expr->dot.name = g_strdup (name);
+
+ return expr;
+}
+
+ast_expression_t *
ast_expression_new_void (void)
{
return expression_new (AST_VOID_EXPRESSION);