aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ast.c b/src/ast.c
index 528d30a..024cebf 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -777,3 +777,10 @@ struct type *reverse_type_list(struct type *root)
return new_root;
}
+struct ast *chain_base(struct ast *node)
+{
+ if (node->chain)
+ return chain_base(node->chain);
+
+ return node;
+}