forked from qt-creator/qt-creator
		
	Some cleanup in the C++ preprocessor.
Introduced pp-scanner.cpp, renamed `pp' to `Preprocessor' and removed useless #includes.
This commit is contained in:
		| @@ -32,11 +32,26 @@ | ||||
| ***************************************************************************/ | ||||
|  | ||||
| #include "pp.h" | ||||
| #include "pp-cctype.h" | ||||
| #include "pp-macro-expander.h" | ||||
| #include <QDateTime> | ||||
|  | ||||
| using namespace CPlusPlus; | ||||
|  | ||||
| inline static bool comment_p (const char *__first, const char *__last) | ||||
| { | ||||
|     if (__first == __last) | ||||
|         return false; | ||||
|  | ||||
|     if (*__first != '/') | ||||
|         return false; | ||||
|  | ||||
|     if (++__first == __last) | ||||
|         return false; | ||||
|  | ||||
|     return (*__first == '/' || *__first == '*'); | ||||
| } | ||||
|  | ||||
| MacroExpander::MacroExpander (Environment &env, pp_frame *frame) | ||||
|     : env(env), frame(frame), | ||||
|       lines(0), generated_lines(0) | ||||
| @@ -137,7 +152,7 @@ const char *MacroExpander::operator () (const char *__first, const char *__last, | ||||
|             __result->append(__first, next_pos - __first); | ||||
|             __first = next_pos; | ||||
|         } | ||||
|         else if (_PP_internal::comment_p (__first, __last)) | ||||
|         else if (comment_p (__first, __last)) | ||||
|         { | ||||
|             __first = skip_comment_or_divop (__first, __last); | ||||
|             int n = skip_comment_or_divop.lines; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user