Commit 4a6fd427 authored by Houtan's avatar Houtan

preprocessor: add line number to field in structure that macro variables are saved to. #1564
parent e3bc7250
......@@ -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
......
......@@ -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();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment