aboutsummaryrefslogtreecommitdiffstats
path: root/variable.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-01-29 20:19:22 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-01-29 20:19:22 -0500
commitb9ceb80c9caa2a4a1659615991e7daa0b1d9fb66 (patch)
treebc0720404a935018c75524555d90a320512398c6 /variable.h
parentaccef5f54c0a38b0de3c2dddbaf7b30c6d226541 (diff)
rewrite; a lot better now
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/variable.h b/variable.h
index fd84a6e..b0f27d2 100644
--- a/variable.h
+++ b/variable.h
@@ -1,24 +1,20 @@
-#ifndef TOKEN_H_
-#define TOKEN_H_
+#ifndef VARIABLE_H_
+#define VARIABLE_H_
#include <stdint.h>
typedef struct {
- uint16_t nameidx;
- uint8_t type;
- uint8_t info;
+ uint8_t used :1;
+ uint8_t fromc :1;
+ uint8_t valtype :2;
uint32_t value;
} variable;
-#define INFO_ARGS(x) ((x) & 0x07)
-#define INFO_RET (1 << 3)
-
-enum vartype {
- VALUE = 0,
- VARIABLE,
- OPERATOR,
- FUNCTION,
- CFUNCTION
+enum valtype {
+ STRING = 0,
+ INTEGER,
+ FLOAT,
+ FUNC
};
-#endif // TOKEN_H_
+#endif // VARIABLE_H_