From 79ab1a4223d53bbdbffc55ae7f9740d953c57945 Mon Sep 17 00:00:00 2001 From: glenda Date: Sat, 22 Oct 2022 19:03:56 +0000 Subject: Prepare for a namespace implementation at some point --- apl9.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'apl9.h') diff --git a/apl9.h b/apl9.h index 54d827b..87b65f4 100644 --- a/apl9.h +++ b/apl9.h @@ -24,6 +24,7 @@ typedef enum AtypeRune, AtypeMixed, AtypeArray, + AtypeNamespace, } arrayDataType; typedef enum @@ -59,6 +60,7 @@ typedef enum /* Data types */ typedef struct Mixed Mixed; +typedef struct Namespace Namespace; typedef struct Array Array; typedef struct Statement Statement; typedef struct Operator Operator; @@ -83,6 +85,12 @@ struct Mixed }; }; +struct Namespace +{ + Rune *displayform; + Symtab *syms; +}; + #define GetRank(a) ((u8int)((a->info & 0x000000000000000F) >> 0)) #define GetType(a) ((u8int)((a->info & 0x00000000000000F0) >> 4)) #define GetStrand(a) ((u8int)((a->info & 0x0000000000000100) >> 8)) @@ -100,6 +108,7 @@ struct Array Rune *runedata; Mixed *mixeddata; Array **arraydata; + Namespace **nsdata; Array *prototype; /* only in use when size == 0 and type == AtypeArray */ }; uvlong size; @@ -243,6 +252,7 @@ struct ThreadData QLock lock; Rendez newmail; Array *name; + Array *ns; }; struct Mail @@ -271,6 +281,7 @@ Array *mkscalarint(vlong); Array *mkscalarfloat(double); Array *mkscalarrune(Rune); Array *mkrunearray(Rune *); +Array *mkscalarns(Namespace *); Array *duparray(Array *); Array *duparrayshape(Array *, int); int simplearray(Array *); @@ -489,4 +500,5 @@ extern opmonad hybridoperatordefs[]; /* hybrids.c */ extern int arrayalloccounts; /* memory.c */ extern int datumalloccounts; /* memory.c */ extern QuadnameDef quadnames[]; /* quadnames.c */ -extern int printprecision; /* print.c */ \ No newline at end of file +extern int printprecision; /* print.c */ +extern Array *rootns; /* symbol.c */ \ No newline at end of file -- cgit v1.2.3