Leandro Melo
bf9bc9914b
C++: Fix argument tracking in macro expansion
...
Due to latest changes the macro arguments were no longer being tracked.
Then they were no available in the document's macro uses. The patch also
makes sure that the preprocessor condition to be expanded is spelled
exactly as in the source code (this guarantees that offsets will be
properly calculated).
Change-Id: I8aff0c3aca0c528ef2c4bcfa56ff1c3da2961060
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2012-05-23 17:40:05 +02:00
Thorbjørn Lindeijer
b35b0dd5e2
CPlusPlus: Removed two unused member variables
...
Change-Id: I1dd97c742af7c2783baaf04384ef2749027f3b9f
Reviewed-by: hjk <qthjk@ovi.com >
2012-05-02 11:12:52 +02:00
hjk
6d393252c4
preprocessor: rename operator() into run.
...
Easier to follow.
Change-Id: I6da1ca862ddb7048a6d16bf5e6ea18d6b2cfc7f8
Reviewed-by: hjk <qthjk@ovi.com >
2012-04-19 19:37:14 +02:00
hjk
6d837b627a
preprocessor: don't store original sources, it's never accessed again
...
Change-Id: I3b06cfc827543d20069f69e00123ccf2bc19ed31
Reviewed-by: hjk <qthjk@ovi.com >
2012-04-19 19:30:17 +02:00
hjk
0362016f02
preprocessor: inline state setup
...
Change-Id: Icc3ee542c8e8f95dfd48604144e3f4ab638fdcd4
Reviewed-by: hjk <qthjk@ovi.com >
2012-04-19 19:05:29 +02:00
hjk
a9a894558f
preprocessor: the state stack seems unused. remove it.
...
Change-Id: Id53c5ebc2867c1ea1e62bb9be6eebe9732774713
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com >
2012-04-19 18:47:37 +02:00
hjk
538901d441
preprocessor: make Preprocessor::preprocess private
...
Change-Id: Ic81e3ebec1b42ae0698a340ee7e1c711225c1162
Reviewed-by: hjk <qthjk@ovi.com >
2012-04-19 18:47:03 +02:00
hjk
64565e795a
preprocessor: remove unused Preprocessor::string function
...
Change-Id: I12e487d278621325bfc3add4c569297efe3c264b
Reviewed-by: hjk <qthjk@ovi.com >
2012-04-19 18:42:45 +02:00
hjk
17c114fde8
preprocessor: make CPlusPlus::Internal::ByteArrayRef public
...
Change-Id: Ief6ea71f750b6ba19b650050bae376f4ad82d9d2
Reviewed-by: hjk <qthjk@ovi.com >
2012-04-19 18:37:31 +02:00
hjk
9e3127a2f6
preprocessor: don't create temporary bytearray objects to handle commas
...
Change-Id: I1c45bb9a5118e19b15878eb04e65b52bd6c5d1e7
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com >
2012-04-18 13:20:04 +02:00
Erik Verbruggen
f5aacb89eb
[C++] Robustness fix for boost's preprocessor/seq/fold_right.hpp.
...
Change-Id: I11f6cff556519b768dd5d979dfd184809ed18291
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2012-03-30 16:05:18 +02:00
Erik Verbruggen
ff0a465403
[C++] Always output a #line as first line of the pp output.
...
Change-Id: I60d25109ae8fe3628b1899078a21010263787c33
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2012-03-30 13:24:36 +02:00
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