diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-01 06:19:39 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-01 06:19:39 +0000 |
commit | 36a0aa7ca717583de4d0d2eda4ab721ed5907cdb (patch) | |
tree | 31a44a63f5280d362281e3aedf7c120f4aed024a /gcc/cpphash.h | |
parent | ddc639964860fe71f46b6c3a679372d24af4a9ce (diff) | |
download | gcc-36a0aa7ca717583de4d0d2eda4ab721ed5907cdb.tar.gz |
* 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/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 82746b5e24c..12b64a80afa 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; |