summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-01 06:19:39 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-01 06:19:39 +0000
commit36a0aa7ca717583de4d0d2eda4ab721ed5907cdb (patch)
tree31a44a63f5280d362281e3aedf7c120f4aed024a /gcc/cpplib.h
parentddc639964860fe71f46b6c3a679372d24af4a9ce (diff)
downloadppe42-gcc-36a0aa7ca717583de4d0d2eda4ab721ed5907cdb.tar.gz
ppe42-gcc-36a0aa7ca717583de4d0d2eda4ab721ed5907cdb.zip
* cpphash.h (struct cpp_reader): New members line, pseudo_newlines.
* cpplex.c (handle_newline): Update prototype. Maintain logical line number. (skip_escaped_newlines, skip_block_comment, parse_string): Update accordingly. (_cpp_lex_token): Update, and store token position within the token. * cpplib.h (struct cpp_token): Add line and column entries. * cppmacro.c (replace_args): Position stringified tokens correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44533 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 58e4af60316..fb7fac276db 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -172,6 +172,8 @@ struct cpp_string
occupy 12 bytes on 32-bit hosts and 16 bytes on 64-bit hosts. */
struct cpp_token
{
+ unsigned int line; /* Logical line of first char of token. */
+ unsigned short col; /* Column of first char of token. */
ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* token type */
unsigned char flags; /* flags - see above */
OpenPOWER on IntegriCloud