scriptreader.h

changeset 50
2e333a3ca49a
parent 48
976c57f153b3
child 51
2cfa6edbf928
equal deleted inserted replaced
49:8e2f7a031410 50:2e333a3ca49a
65 short casecursor; 65 short casecursor;
66 66
67 // Marks to case-blocks 67 // Marks to case-blocks
68 int casemarks[MAX_CASE]; 68 int casemarks[MAX_CASE];
69 69
70 // Numbers of the case labels
71 int casenumbers[MAX_CASE];
72
70 // actual case blocks 73 // actual case blocks
71 DataBuffer* casebuffers[MAX_CASE]; 74 DataBuffer* casebuffers[MAX_CASE];
72 75
73 // What is the current buffer of the block? 76 // What is the current buffer of the block?
74 DataBuffer* recordbuffer; 77 DataBuffer* recordbuffer;
117 120
118 void ParserError (const char* message, ...); 121 void ParserError (const char* message, ...);
119 void ParserWarning (const char* message, ...); 122 void ParserWarning (const char* message, ...);
120 123
121 // parser.cxx: 124 // parser.cxx:
122 void BeginParse (ObjWriter* w); 125 void ParseBotScript (ObjWriter* w);
123 DataBuffer* ParseCommand (CommandDef* comm); 126 DataBuffer* ParseCommand (CommandDef* comm);
124 DataBuffer* ParseExpression (int reqtype); 127 DataBuffer* ParseExpression (int reqtype);
125 DataBuffer* ParseAssignment (ScriptVar* var); 128 DataBuffer* ParseAssignment (ScriptVar* var);
126 int ParseOperator (bool peek = false); 129 int ParseOperator (bool peek = false);
127 DataBuffer* ParseExprValue (int reqtype); 130 DataBuffer* ParseExprValue (int reqtype);
129 132
130 // preprocessor.cxx: 133 // preprocessor.cxx:
131 void PreprocessDirectives (); 134 void PreprocessDirectives ();
132 void PreprocessMacros (); 135 void PreprocessMacros ();
133 DataBuffer* ParseStatement (ObjWriter* w); 136 DataBuffer* ParseStatement (ObjWriter* w);
137 void AddSwitchCase (ObjWriter* w, DataBuffer* b);
134 138
135 private: 139 private:
136 bool atnewline; 140 bool atnewline;
137 char c; 141 char c;
138 void ParserMessage (const char* header, char* message); 142 void ParserMessage (const char* header, char* message);

mercurial