1 #ifndef MSP_GL_SL_OUTPUT_H_
2 #define MSP_GL_SL_OUTPUT_H_
12 class Formatter: private TraversingVisitor
17 std::string formatted;
18 unsigned source_index;
22 std::string block_interface;
27 const std::string &apply(Stage &, Compiler::Mode);
28 const std::string &apply(Node &n) { n.visit(*this); return formatted; }
31 void append(const std::string &);
33 void set_source(unsigned, unsigned);
35 virtual void visit(Block &);
36 virtual void visit(Literal &);
37 virtual void visit(ParenthesizedExpression &);
38 virtual void visit(VariableReference &);
39 virtual void visit(InterfaceBlockReference &);
40 virtual void visit(MemberAccess &);
41 virtual void visit(UnaryExpression &);
42 virtual void visit(BinaryExpression &);
43 virtual void visit(Assignment &);
44 virtual void visit(FunctionCall &);
45 virtual void visit(ExpressionStatement &);
46 virtual void visit(Import &);
47 virtual void visit(Precision &);
48 virtual void visit(Layout &);
49 virtual void visit(InterfaceLayout &);
50 virtual void visit(StructDeclaration &);
51 virtual void visit(VariableDeclaration &);
52 virtual void visit(InterfaceBlock &);
53 virtual void visit(FunctionDeclaration &);
54 virtual void visit(Conditional &);
55 virtual void visit(Iteration &);
56 virtual void visit(Passthrough &);
57 virtual void visit(Return &);
58 virtual void visit(Jump &);