]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programcompiler.h
Translate shader compile errors to actual source file names
[libs/gl.git] / source / programcompiler.h
index 8c4f54537c7bc0da9f70ce9a744acf154157bb5d..bea3faec1d0fee7552cb4cbd5fb36717dca8fb34 100644 (file)
@@ -44,9 +44,10 @@ private:
                typedef std::string ResultType;
 
                std::string formatted;
+               unsigned source_index;
+               unsigned source_line;
                unsigned indent;
                bool parameter_list;
-               unsigned else_if;
                std::string block_interface;
 
                Formatter();
@@ -54,6 +55,9 @@ private:
                virtual void apply(ProgramSyntax::Stage &);
                const std::string &get_result() const { return formatted; }
                using Visitor::visit;
+               void append(const std::string &);
+               void append(char);
+               void set_source(unsigned, unsigned);
                virtual void visit(ProgramSyntax::Block &);
                virtual void visit(ProgramSyntax::Literal &);
                virtual void visit(ProgramSyntax::ParenthesizedExpression &);
@@ -377,7 +381,7 @@ private:
 
        Resources *resources;
        ProgramSyntax::Module *module;
-       std::set<std::string> imported_names;
+       std::vector<std::string> imported_names;
 
 public:
        ProgramCompiler();