Fix for br979 part 2 - handle blank lines in macro definition continuation.
This commit is contained in:
parent
0fc10e3e70
commit
d5b41853fd
|
|
@ -39,6 +39,7 @@ static void def_finish(void);
|
|||
static void def_undefine(void);
|
||||
static void do_define(void);
|
||||
static int def_is_done(void);
|
||||
static void def_continue(void);
|
||||
static int is_defined(const char*name);
|
||||
|
||||
static int macro_needs_args(const char*name);
|
||||
|
|
@ -358,6 +359,8 @@ keywords (include|define|undef|ifdef|ifndef|else|elseif|endif)
|
|||
if (def_is_done()) {
|
||||
def_finish();
|
||||
yy_pop_state();
|
||||
} else {
|
||||
def_continue();
|
||||
}
|
||||
|
||||
istack->lineno += 1;
|
||||
|
|
@ -1130,6 +1133,14 @@ static int def_is_done(void)
|
|||
return !define_continue_flag;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the define_continue_flag.
|
||||
*/
|
||||
static void def_continue(void)
|
||||
{
|
||||
define_continue_flag = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* After some number of calls to do_define, this function is called to
|
||||
* assigned value to the parsed name. If there is no value, then
|
||||
|
|
|
|||
Loading…
Reference in New Issue