diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-18 01:07:03 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-18 01:07:03 -0700 |
commit | eb053bb851d729fbe4db7959143df5cfb2063793 (patch) | |
tree | 0c49ad61b11611c5cdf17e8bedf13bbdb9a3d210 /src/variable.h | |
parent | 1368849e36e1b5ecd0d595b713ca73f9d88da38b (diff) | |
download | stage-eb053bb851d729fbe4db7959143df5cfb2063793.tar.gz stage-eb053bb851d729fbe4db7959143df5cfb2063793.tar.bz2 stage-eb053bb851d729fbe4db7959143df5cfb2063793.tar.xz stage-eb053bb851d729fbe4db7959143df5cfb2063793.zip |
Setting up AstNode & Variable classes.
Diffstat (limited to 'src/variable.h')
-rw-r--r-- | src/variable.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/variable.h b/src/variable.h new file mode 100644 index 0000000..3df9255 --- /dev/null +++ b/src/variable.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef VARIABLE_H | ||
2 | #define VARIABLE_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | |||
6 | #include <bu/string.h> | ||
7 | |||
8 | class Variable | ||
9 | { | ||
10 | public: | ||
11 | enum Type | ||
12 | { | ||
13 | Undef, | ||
14 | Int, | ||
15 | Float, | ||
16 | Bool, | ||
17 | String | ||
18 | }; | ||
19 | |||
20 | public: | ||
21 | Variable(); | ||
22 | virtual ~Variable(); | ||
23 | |||
24 | private: | ||
25 | Type eType; | ||
26 | bool bNull; | ||
27 | |||
28 | union | ||
29 | { | ||
30 | int64_t iValue; | ||
31 | double fValue; | ||
32 | bool bValue; | ||
33 | Bu::String *sValue; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | #endif | ||