Commit Graph

42 Commits

Author SHA1 Message Date
Erik Verbruggen
60db573660 [C++] Rewrite of the preprocessor.
This rewrite fixes a couple of issues with the pre-processor. It now
supports:
- macros in macro bodies
- stringification of parameters [cpp.stringize]
- the concatenation operator [cpp.concat]
- #include MACRO_HERE
- defined() inside macro bodies used in pp-conditions.

Change-Id: Ifdb78041fb6afadf44f939a4bd66ce2832b8601f
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-29 14:28:17 +02:00
Francois Ferrand
2386d701b6 Preprocessor: fix line for generated code.
The macro used to be at the same line as the first token after the
closing parenthesis.

Change-Id: I4c2d7317632baf612900e84572017aeb247d0585
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2012-03-19 10:48:43 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Christian Kamm
9f1c294dd4 C++ preprocessor: Fix multiline tokens in ifdef'ed out blocks.
Change-Id: If6f9819565f891e861f9e111423d99caa7c0f7aa
Reviewed-on: http://codereview.qt.nokia.com/3884
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-31 07:41:32 +02:00
Christian Kamm
93e367ed0c C++: Don't strip comments from preprocessed source code.
Change-Id: I3a4817d36b9c724abca504c42914a73f97ab34c7
Reviewed-on: http://codereview.qt.nokia.com/3480
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-25 13:20:09 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Roberto Raggi
293f67580d Fixed: Wrong usage highlighting if function's argument list contains comment.
Task-number: QTCREATORBUG-577
2010-03-03 14:11:45 +01:00
Roberto Raggi
146ec6248d Renamed Preprocessor::_true_test 2009-10-21 16:20:45 +02:00
Roberto Raggi
5b7a19425b Use bit vectors to store the preprocessor's state. 2009-10-21 16:19:23 +02:00
hjk
93cbef8724 long live the king 2009-08-14 09:30:56 +02:00
Roberto Raggi
2f649be146 Disable macro expansion when preprocessing in fast-mode. 2009-07-06 09:53:25 +02:00
Jason McDonald
884b7af769 Update license headers and sales contact details.
Reviewed-by: Trust Me
2009-06-17 00:01:27 +10:00
Roberto Raggi
e2a0a4d7c5 Keep the original encoded text around while preprocessing. 2009-06-15 15:39:20 +02:00
Roberto Raggi
bdf6c3d0be Store the encoded file name in a QString. 2009-05-27 15:34:13 +02:00
Roberto Raggi
caad98ec4c Refactored a bit the preprocessor so we can use it to generate file dependencies. 2009-05-13 15:29:59 +02:00
Roberto Raggi
064201ff85 Mark the generated regions of text. 2009-03-04 14:36:47 +01:00
Roberto Raggi
e253f39360 Store the actual arguments of the macro expansions. 2009-03-04 11:47:30 +01:00
Roberto Raggi
5bbb882b3d Introduced expandBuiltinMacro(). 2009-03-03 17:23:12 +01:00
Roberto Raggi
7327a8ea4d Introduced skipActualArguments(). 2009-03-03 16:59:55 +01:00
Roberto Raggi
1d75990667 Introduced processObjectLikeMacro(). 2009-03-03 16:56:55 +01:00
Roberto Raggi
b316939dff Introduced expandObjectLikeMacro(). 2009-03-03 16:46:21 +01:00
Roberto Raggi
656d70fa74 Introduced expandFunctionLikeMacro(). 2009-03-03 16:19:03 +01:00
Roberto Raggi
454438e47d More cleanup. 2009-03-03 10:41:20 +01:00
Roberto Raggi
ae04679373 Introduced processNewline() and processSkippingBlocks(). 2009-03-03 10:27:02 +01:00
Roberto Raggi
d7e86c22b6 Cleanup the function-like macro expansion. 2009-03-03 10:13:51 +01:00
Roberto Raggi
2a8327e57f Obsoleted code. 2009-03-03 09:58:54 +01:00
Roberto Raggi
ebe17889f4 Some refactoring of the preprocessor, it'll simplify my next commits. 2009-03-02 19:03:07 +01:00
Roberto Raggi
ed69c39906 More cleanup 2009-03-02 18:15:58 +01:00
Roberto Raggi
f4e875b9bb Initial testing of the preprocessor. 2009-03-02 11:30:43 +01:00
hjk
8ca887aae2 Fixes: change file license headers to include LGPL 2009-02-25 09:15:00 +01:00
Roberto Raggi
4ffed7a119 Fixes: Parsing of #import directives. 2009-02-05 14:30:25 +01:00
Daniel Molkentin
59affcfffc Bump year in licence header. 2009-01-13 19:22:14 +01:00
Roberto Raggi
0422bcbbd5 Some more clean up in the preprocessor. 2008-12-22 14:10:47 +01:00
Roberto Raggi
753ddb7ce0 Some cleanup in the C++ preprocessor.
Introduced pp-scanner.cpp, renamed `pp' to `Preprocessor' and removed useless #includes.
2008-12-22 11:40:53 +01:00
hjk
da3cb14483 chancge Nokia GPL exception version from 1.2 to 1.3 2008-12-16 17:20:00 +01:00
Roberto Raggi
310d50fd07 Use Macros. 2008-12-08 12:59:57 +01:00
Roberto Raggi
f6fbb274ae Moved the preprocessor. 2008-12-08 12:24:40 +01:00