summaryrefslogtreecommitdiff
path: root/parse/parse.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-01-01 21:09:50 -0800
committerOri Bernstein <ori@eigenstate.org>2018-01-11 22:16:11 -0800
commit90e26e0f687da28530b3b967df0cedf20407c071 (patch)
tree09c85ff396a5f235dbcbd5db2df911b5217bb472 /parse/parse.h
parent94448201527e0c47c2924219bf1a8d0c0c2406b7 (diff)
downloadmc-90e26e0f687da28530b3b967df0cedf20407c071.tar.gz
Move to new trait syntax.
Diffstat (limited to 'parse/parse.h')
-rw-r--r--parse/parse.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/parse/parse.h b/parse/parse.h
index 0bae957..c8db0f5 100644
--- a/parse/parse.h
+++ b/parse/parse.h
@@ -2,6 +2,7 @@
typedef struct Srcloc Srcloc;
typedef struct Tysubst Tysubst;
+typedef struct Traitspec Traitspec;
typedef struct Tok Tok;
typedef struct Node Node;
@@ -118,6 +119,13 @@ struct Tyenv {
Htab *tab;
};
+struct Traitspec {
+ Node **traits;
+ size_t ntraits;
+ Type *param;
+ Type *aux;
+};
+
struct Type {
Ty type;
uint32_t tid;
@@ -125,8 +133,10 @@ struct Type {
Vis vis;
- Node **traits; /* trait list */
- size_t ntraits; /* trait list size */
+ Traitspec **spec;
+ size_t nspec;
+ //Node **traits; /* trait list */
+ //size_t ntraits; /* trait list size */
Type **gparam; /* Tygeneric: type parameters that match the type args */
size_t ngparam; /* Tygeneric: count of type parameters */
@@ -350,6 +360,7 @@ struct Node {
};
/* globals */
+extern Htab *seqbase;
extern Srcloc curloc;
extern char *filename;
extern Tok *curtok; /* the last token we tokenized */