]> git.tdb.fi Git - libs/gl.git/blob - source/glsl/glsl_error.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / glsl / glsl_error.cpp
1 #include "glsl_error.h"
2 #include "parser.h"
3
4 using namespace std;
5
6 namespace Msp {
7 namespace GL {
8 namespace SL {
9
10 invalid_shader_source::invalid_shader_source(const Location &loc, const string &message):
11         runtime_error(format("%s:%d: %s", loc.name, loc.line, message))
12 { }
13
14 syntax_error::syntax_error(const Location &loc, const string &token, const string &message):
15         invalid_shader_source(loc, "Syntax error near '%s': %s", token, message)
16 { }
17
18 parse_error::parse_error(const Location &loc, const string &token, const string &expected):
19         invalid_shader_source(loc, "Parse error at '%s': expected %s", token, expected)
20 { }
21
22
23 Diagnostic::Diagnostic(Severity v, int s, unsigned l, const string &m):
24         severity(v),
25         source(s),
26         line(l),
27         provoking_source(s),
28         provoking_line(l),
29         message(m)
30 { }
31
32 } // namespace SL
33 } // namespace GL
34 } // namespace Msp