aboutsummaryrefslogtreecommitdiff
path: root/interpreter/syntax.h
diff options
context:
space:
mode:
authorCamil Staps2016-10-14 22:17:01 +0200
committerCamil Staps2016-10-14 22:17:01 +0200
commit6ca377762516888b0488d60c971e0660ae6035f4 (patch)
tree74c6b013aa80f61cd0bd511a097e54a686b33680 /interpreter/syntax.h
parentMake debug graphs a command line option (-g) (diff)
token_list using an array for memory efficiency
Diffstat (limited to 'interpreter/syntax.h')
-rw-r--r--interpreter/syntax.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/interpreter/syntax.h b/interpreter/syntax.h
index 09ba3bc..f2043c3 100644
--- a/interpreter/syntax.h
+++ b/interpreter/syntax.h
@@ -26,8 +26,9 @@ struct token {
};
struct token_list {
- struct token elem;
- struct token_list *rest;
+ unsigned int length;
+ unsigned int index;
+ struct token elems[];
};
void free_token(struct token*);