preprocessor: add line number to field in structure that macro variables are saved to. #1564

time-shift
Houtan 2017-12-07 18:11:00 +01:00
parent e3bc725027
commit 4a6fd427e0
2 changed files with 2 additions and 2 deletions

View File

@ -10767,7 +10767,7 @@ and to abort. The argument must evaluate to a string.
@deffnx {Macro directive} @@#echomacrovars(save) @var{MACRO_EXPRESSION}
Asks the preprocessor to display the value of all macro variables up until this
point. If the @code{save} option is passed, the values of the macro variables
are saved to @code{options_.macrovars}.
are saved to @code{options_.macrovars_line_<<line_number>>}.
@end deffn
@node Typical usages

View File

@ -229,6 +229,6 @@ MacroDriver::printvars(const Macro::parser::location_type &l, const bool tostdou
for (map<string, const MacroValue *>::const_iterator it = env.begin();
it != env.end(); it++)
intomfile<< "options_.macrovars." << it->first << " = " << it->second->print() << ";" << endl;
intomfile<< "options_.macrovars_line_" << l.begin.line << "." << it->first << " = " << it->second->print() << ";" << endl;
return intomfile.str();
}