@@ -103,7 +103,7 @@ void getIncludeFiles(Meta_Vector & wordVector, size_t index)
103
103
}
104
104
}
105
105
106
- void getDefine (Meta_Vector & wordVector, size_t index)
106
+ void getDefine (Meta_Vector & wordVector, size_t index, bool & needNextLine )
107
107
{
108
108
int curLine = wordVector[index ].line ;
109
109
int defineType = TYPE_CONSTANT;
@@ -198,6 +198,8 @@ void getDefine(Meta_Vector & wordVector, size_t index)
198
198
}
199
199
else {
200
200
printf (" Line %d is a function define: %s\n " , curLine, wordVector[index +3 ].data .str );
201
+ restoreLine (wordVector, index , defineStr);
202
+ printf (" %s\n " , defineStr);
201
203
}
202
204
}
203
205
@@ -206,6 +208,7 @@ void analysis(Meta_Vector & wordVector)
206
208
int curLine = 0 ;
207
209
bool newLineFlag = true ;
208
210
size_t vectorSize = wordVector.size ();
211
+ bool needNextLine = false ;
209
212
210
213
for (size_t i=0 ; i < vectorSize; i++)
211
214
{
@@ -221,7 +224,7 @@ void analysis(Meta_Vector & wordVector)
221
224
getIncludeFiles (wordVector, i);
222
225
}
223
226
else if (strcmp (wordVector[i+1 ].data .str , " define" ) == 0 ) {
224
- getDefine (wordVector, i);
227
+ getDefine (wordVector, i, needNextLine );
225
228
}
226
229
else if (strcmp (wordVector[i+1 ].data .str , " if" ) == 0 ) {
227
230
printf (" Line %d is a if compile condition.\n " , wordVector[i].line );
0 commit comments