summaryrefslogtreecommitdiff
path: root/parse/parse.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-09 16:49:09 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-09 16:49:09 -0700
commited8711e68e441e9884d734932373317834665833 (patch)
tree08a3f37550af1b6adb1ad912ee6df70fa6c1ceaf /parse/parse.h
parentbd5fb6d0628831cde25f13e3fe461786d616a06e (diff)
downloadmc-ed8711e68e441e9884d734932373317834665833.tar.gz
Refactor code to add jump tables, and prepare to generate them.
Diffstat (limited to 'parse/parse.h')
-rw-r--r--parse/parse.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/parse/parse.h b/parse/parse.h
index fa7b99e..6070744 100644
--- a/parse/parse.h
+++ b/parse/parse.h
@@ -23,6 +23,7 @@ typedef struct Tok Tok;
typedef struct Node Node;
typedef struct Ucon Ucon;
typedef struct Stab Stab;
+typedef struct Jtab Jtab;
typedef struct Type Type;
typedef struct Trait Trait;
@@ -174,6 +175,13 @@ struct Type {
char isreflect; /* Tyname: whether this type has reflection info */
};
+struct Jtab {
+ Node **val;
+ size_t nval;
+ Node **dst;
+ size_t ndst;
+};
+
struct Ucon {
Srcloc loc;
size_t id; /* unique id */
@@ -248,6 +256,7 @@ struct Node {
char *lblval;
int boolval;
Node *fnval;
+ Jtab *jtab;
};
} lit;