aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2014-04-11 22:26:03 +0800
committerTeddy <ted.sybil@gmail.com>2014-04-11 22:26:03 +0800
commit34495ef7b97f3220462c974f06f1cd9c652f2a03 (patch)
tree0645813d9745270f51f6ec30ad02d2cf2763d814
parent5e2df7c1230bfed3b9bfcd1c6787ae8bec3df2b3 (diff)
more elegant const
-rw-r--r--const.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/const.h b/const.h
index 9e242c0..80ef83a 100644
--- a/const.h
+++ b/const.h
@@ -1,21 +1,25 @@
-#define EXP_POSTFIX 1024
-#define POSTFIX_ARR 1025
-#define POSTFIX_CALL 1026
-#define POSTFIX_DOT 1027
-#define POSTFIX_PTR 1028
-#define EXP_CAST 1029
-#define INITR_NORM 1030
-#define INITR_ARR 1031
-#define DECLR_FUNC 1032
-#define DECLR_ARR 1033
-#define STMT_EXP 1034
-#define STMT_COMP 1035
-#define STMT_IF 1036
-#define STMT_WHILE 1037
-#define STMT_FOR 1038
-#define STMT_CONT 1039
-#define STMT_BREAK 1040
-#define STMT_RET 1041
+#ifndef CONST_H
+#define CONST_H
+enum {
+ EXP_POSTFIX = 1024,
+ POSTFIX_ARR,
+ POSTFIX_CALL,
+ POSTFIX_DOT,
+ POSTFIX_PTR,
+ EXP_CAST,
+ INITR_NORM,
+ INITR_ARR,
+ DECLR_FUNC,
+ DECLR_ARR,
+ STMT_EXP,
+ STMT_COMP,
+ STMT_IF,
+ STMT_WHILE,
+ STMT_FOR,
+ STMT_CONT,
+ STMT_BREAK,
+ STMT_RET
+};
#define MAX_CHDN 1024
#define MAX_DEBUG_PRINT_BUFF 1024
@@ -26,3 +30,4 @@
#define CHAR_SIZE 1
#define EXT_LINKAGE 1
#define NO_LINKAGE 0
+#endif