summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/parse/node.c b/parse/node.c
index a13a737..8aeeefe 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -232,12 +232,24 @@ Node *mkfloat(int line, double val)
return n;
}
-Node *mkseq(int line, Node **vals, size_t nvals)
+Node *mkarray(int line, Node **vals, size_t nvals)
{
Node *n;
n = mknode(line, Nlit);
- n->lit.littype = Lseq;
+ n->lit.littype = Larray;
+ n->lit.nelt = nvals;
+ n->lit.seqval = vals;
+
+ return n;
+}
+
+Node *mkstruct(int line, Node **vals, size_t nvals)
+{
+ Node *n;
+
+ n = mknode(line, Nlit);
+ n->lit.littype = Lstruct;
n->lit.nelt = nvals;
n->lit.seqval = vals;