aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorNeil Booth <neil@cat.daikokuya.demon.co.uk>2001-08-01 06:19:39 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-08-01 06:19:39 +0000
commit1444f2ed7cfaf30f6e50da21f9a74e164f1fad84 (patch)
tree31a44a63f5280d362281e3aedf7c120f4aed024a /gcc/cpplib.h
parent7f8a212577aa9bc71a1828635b426c3f2157c3b6 (diff)
downloadgcc-1444f2ed7cfaf30f6e50da21f9a74e164f1fad84.zip
gcc-1444f2ed7cfaf30f6e50da21f9a74e164f1fad84.tar.gz
gcc-1444f2ed7cfaf30f6e50da21f9a74e164f1fad84.tar.bz2
cpphash.h (struct cpp_reader): New members line, pseudo_newlines.
* 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. From-SVN: r44533
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 58e4af6..fb7fac2 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 */