namespace SL {
Formatter::Formatter():
+ stage(0),
source_index(0),
source_line(1),
indent(0),
parameter_list(false)
{ }
-void Formatter::apply(Stage &s)
+const string &Formatter::apply(Stage &s)
{
+ SetForScope<Stage *> set_stage(stage, &s);
+
GLApi api = get_gl_api();
const Version &ver = s.required_version;
if(!s.required_extensions.empty())
formatted += '\n';
- StageVisitor::apply(s);
+ visit(s.content);
+
+ return formatted;
}
void Formatter::append(const string &text)