summaryrefslogtreecommitdiff
path: root/apl9.h
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-12 18:46:55 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-12 18:46:55 +0000
commitd596e90554816e62d39fbaf68713810ed1eaf764 (patch)
treecf06e3beab322bd261248761a90cf93d4d520bd7 /apl9.h
parent85aa2ad424c68343ef09e5f6df243ad6499e47d5 (diff)
Add statements separated by ⋄
Diffstat (limited to 'apl9.h')
-rw-r--r--apl9.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/apl9.h b/apl9.h
index 620eae6..f6c963c 100644
--- a/apl9.h
+++ b/apl9.h
@@ -29,7 +29,7 @@ typedef enum
/* Data types */
typedef struct Array Array;
-typedef struct Expr Expr;
+typedef struct Statement Statement;
typedef struct Function Function;
typedef struct Datum Datum;
typedef struct Symbol Symbol;
@@ -49,17 +49,18 @@ struct Array
};
};
-struct Expr
+struct Statement
{
int ntoks;
Datum *toks;
+ Statement *next;
};
struct Function
{
union {
int code;
- Expr *dfn;
+ Statement *dfn;
};
Array *left;
};
@@ -69,7 +70,7 @@ struct Datum
datumTag tag;
union {
Array *array;
- Expr expr;
+ Statement stmt;
Function func;
Symbol *symbol;
};
@@ -98,7 +99,7 @@ Rune *ppdatums(Datum *, int);
Rune *pparray(Array *);
/* lexer.c */
-Datum *lexline(Rune *, int *, Symtab *);
+Statement *lexline(Rune *, Symtab *);
/* array.c */
Array *mkarray(int, int, int);
@@ -108,7 +109,7 @@ int simplearray(Array *);
int simplescalar(Array *);
/* eval.c */
-Datum *eval(Datum *, int *);
+Datum *eval(Statement *);
/* symbol.c */
Symbol *getsym(Symtab *, Rune *);