diff options
author | Neil Booth <neil@cat.daikokuya.demon.co.uk> | 2001-08-01 06:19:39 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-08-01 06:19:39 +0000 |
commit | 1444f2ed7cfaf30f6e50da21f9a74e164f1fad84 (patch) | |
tree | 31a44a63f5280d362281e3aedf7c120f4aed024a /gcc/cpphash.h | |
parent | 7f8a212577aa9bc71a1828635b426c3f2157c3b6 (diff) | |
download | gcc-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/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 82746b5..12b64a8 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -246,6 +246,12 @@ struct cpp_reader /* Lexer state. */ struct lexer_state state; + /* Source line tracking. Subtract pseudo_newlines from the actual + line number to get the line number of preprocessed output. Used + for escaped newlines and macro args that cross multiple lines. */ + unsigned int line; + unsigned int pseudo_newlines; + /* The position of the last lexed token and last lexed directive. */ cpp_lexer_pos lexer_pos; cpp_lexer_pos directive_pos; |