aboutsummaryrefslogtreecommitdiffstats
path: root/src/tok.c
diff options
context:
space:
mode:
authorkatherine <k@airen-no-jikken.icu>2019-05-30 04:05:29 -0700
committerkatherine <k@airen-no-jikken.icu>2019-05-30 04:05:29 -0700
commit00d99b082162e287d481577915be73d5bf1dc483 (patch)
tree9d5fa7e28b6d9dcf959a6d3884bc62a6b3d9d9d5 /src/tok.c
parent58e3054794cde4148267d81c80cc3109fbd19298 (diff)
downloadconfconf-00d99b082162e287d481577915be73d5bf1dc483.tar.gz
add enum defined types
Diffstat (limited to 'src/tok.c')
-rw-r--r--src/tok.c9
1 files changed, 5 insertions, 4 deletions
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;