src/Types.h

changeset 108
6409ece8297c
parent 88
5def6ff8b466
child 109
6572803cd0ca
equal deleted inserted replaced
107:55c2bcd8ed5c 108:6409ece8297c
29 #ifndef BOTC_TYPES_H 29 #ifndef BOTC_TYPES_H
30 #define BOTC_TYPES_H 30 #define BOTC_TYPES_H
31 31
32 #include <cstdlib> 32 #include <cstdlib>
33 #include <stdexcept> 33 #include <stdexcept>
34 #include "Macros.h"
34 #include "String.h" 35 #include "String.h"
35 36
36 static const std::nullptr_t null = nullptr; 37 static const std::nullptr_t null = nullptr;
37 38
38 // ============================================================================= 39 // =============================================================================
39 // 40 //
40 // Byte datatype 41 named_enum DataType
41 //
42 typedef int32_t word;
43 typedef unsigned char byte;
44
45 // =============================================================================
46 //
47 // Parser mode: where is the parser at?
48 //
49 enum EParserMode
50 { 42 {
51 ETopLevelMode, // at top level 43 TYPE_Unknown = 0,
52 EEventMode, // inside event definition 44 TYPE_Void,
53 EMainLoopMode, // inside mainloop 45 TYPE_Int,
54 EOnenterMode, // inside onenter 46 TYPE_String,
55 EOnexitMode, // inside onexit 47 TYPE_Bool,
56 };
57
58 // =============================================================================
59 //
60 enum EType
61 {
62 EUnknownType = 0,
63 EVoidType,
64 EIntType,
65 EStringType,
66 EBoolType,
67 }; 48 };
68 49
69 // ============================================================================= 50 // =============================================================================
70 // 51 //
71 struct ByteMark 52 struct ByteMark

mercurial