From c11341992fe6d087bff7548623d6fac955d1695d Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 9 Jun 2017 14:21:40 +0900 Subject: [PATCH] define NodeType (enum) --- src/regparse.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/regparse.h b/src/regparse.h index e3be069..6e81353 100644 --- a/src/regparse.h +++ b/src/regparse.h @@ -32,16 +32,18 @@ #include "regint.h" /* node type */ -#define NODE_STR 0 -#define NODE_CCLASS 1 -#define NODE_CTYPE 2 -#define NODE_BREF 3 -#define NODE_QTFR 4 -#define NODE_ENCLOSE 5 -#define NODE_ANCHOR 6 -#define NODE_LIST 7 -#define NODE_ALT 8 -#define NODE_CALL 9 +typedef enum { + NODE_STR = 0, + NODE_CCLASS = 1, + NODE_CTYPE = 2, + NODE_BREF = 3, + NODE_QTFR = 4, + NODE_ENCLOSE = 5, + NODE_ANCHOR = 6, + NODE_LIST = 7, + NODE_ALT = 8, + NODE_CALL = 9 +} NodeType; /* node type bit */ #define NODE_TYPE2BIT(type) (1<<(type)) -- 2.40.0