From 00d99b082162e287d481577915be73d5bf1dc483 Mon Sep 17 00:00:00 2001 From: katherine Date: Thu, 30 May 2019 04:05:29 -0700 Subject: add enum defined types --- src/tok.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/tok.c') diff --git a/src/tok.c b/src/tok.c index 177507a..c80d397 100644 --- a/src/tok.c +++ b/src/tok.c @@ -70,9 +70,10 @@ static void sub_match_op(void) enum tok_type_e type; char name[(32 < TOK_MAX_LEN ? 32 : TOK_MAX_LEN)]; } ops[] = { - { true, TOK_OP_SUFFIX, ".suffix" }, - { true, TOK_OP_STRUCT, ".struct" }, - { true, TOK_OP_UNION, ".union" }, + { true, TOK_OP_SUFFIX, ".suffix" }, + { true, TOK_OP_STRUCT, ".struct" }, + { true, TOK_OP_UNION, ".union" }, + { true, TOK_OP_ENUM, ".enum" }, }; unsigned i, j; bool again; @@ -95,7 +96,7 @@ static void sub_match_op(void) val[vlen] = c; vlen++; - for (j = 0; j < 3; j++) { + for (j = 0; j < 4; j++) { if (!ops[j].possible) continue; -- cgit v1.2.3