lex.c (saving_parse_to_obstack): New global.

1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>

	* lex.c (saving_parse_to_obstack): New global.
	(reinit_parse_for_block): Use.
	(reinit_parse_for_expr): Use.
	(check_newline): Use.

From-SVN: r30896
This commit is contained in:
Mumit Khan 1999-12-14 05:33:22 +00:00 committed by Mumit Khan
parent 0f7db4884e
commit 0b807ad843
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,10 @@
1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
* lex.c (saving_parse_to_obstack): New global.
(reinit_parse_for_block): Use.
(reinit_parse_for_expr): Use.
(check_newline): Use.
1999-12-13 Mark Mitchell <mark@codesourcery.com>
* optimize.c (initialize_inlined_parameters): Take FN to which the

View file

@ -113,6 +113,9 @@ file_name_nondirectory (x)
struct obstack inline_text_obstack;
char *inline_text_firstobj;
/* Nonzero if parse output is being saved to an obstack for later parsing. */
static int saving_parse_to_obstack = 0;
#if USE_CPPLIB
#include "cpplib.h"
extern cpp_reader parse_in;
@ -1618,7 +1621,9 @@ reinit_parse_for_block (pyychar, obstackp)
{
int this_lineno = lineno;
saving_parse_to_obstack = 1;
c = skip_white_space (c);
saving_parse_to_obstack = 0;
/* Don't lose our cool if there are lots of comments. */
if (lineno == this_lineno + 1)
@ -1747,7 +1752,9 @@ reinit_parse_for_expr (obstackp)
{
int this_lineno = lineno;
saving_parse_to_obstack = 1;
c = skip_white_space (c);
saving_parse_to_obstack = 0;
/* Don't lose our cool if there are lots of comments. */
if (lineno == this_lineno + 1)
@ -2489,10 +2496,11 @@ linenum:
(2) I don't know how well that would work in the presense
of filenames that contain wide characters. */
if (saw_line)
if (saw_line || saving_parse_to_obstack)
{
/* Don't treat \ as special if we are processing #line 1 "...".
If you want it to be treated specially, use # 1 "...". */
If you want it to be treated specially, use # 1 "...". Also
ignore these if saving to an obstack for later parsing. */
ignore_escape_flag = 1;
}