X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fglsl_error.cpp;h=d7bf458ce7782f55ac6e59b830549a66fe27b94d;hb=e0caeb9be47bc140978552bb7149f1c9c8c973db;hp=ea8e93064403d89c4ce5a3cb1fcc9947c3a58492;hpb=47286086863b6009192ffdb3d3471c83211ee943;p=libs%2Fgl.git diff --git a/source/glsl/glsl_error.cpp b/source/glsl/glsl_error.cpp index ea8e9306..d7bf458c 100644 --- a/source/glsl/glsl_error.cpp +++ b/source/glsl/glsl_error.cpp @@ -11,10 +11,32 @@ invalid_shader_source::invalid_shader_source(const Location &loc, const string & runtime_error(format("%s:%d: %s", loc.name, loc.line, message)) { } +syntax_error::syntax_error(const Location &loc, const string &token, const string &message): + invalid_shader_source(loc, "Syntax error near '%s': %s", token, message) +{ } + parse_error::parse_error(const Location &loc, const string &token, const string &expected): invalid_shader_source(loc, "Parse error at '%s': expected %s", token, expected) { } + +Diagnostic::Diagnostic(): + severity(INFO), + source(0), + line(0), + provoking_source(0), + provoking_line(0) +{ } + +Diagnostic::Diagnostic(Severity v, int s, unsigned l, const string &m): + severity(v), + source(s), + line(l), + provoking_source(s), + provoking_line(l), + message(m) +{ } + } // namespace SL } // namespace GL } // namespace Msp