summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
af0ba2a)
GLSL 4.20 allows qualifiers to be in any order so there's no sense to
enforce a particular order here. Always output them in a compatible
order though.
else if(is_interface_qualifier(token))
{
string next = peek_token(1);
else if(is_interface_qualifier(token))
{
string next = peek_token(1);
- if(is_type(next) || is_precision_qualifier(next))
+ if(is_type(next) || is_qualifier(next))
return parse_variable_declaration();
else
return parse_interface_block();
return parse_variable_declaration();
else
return parse_interface_block();
RefPtr<VariableDeclaration> var = new VariableDeclaration;
string token = peek_token();
RefPtr<VariableDeclaration> var = new VariableDeclaration;
string token = peek_token();
- if(is_sampling_qualifier(token))
+ while(is_qualifier(token))
- var->sampling = parse_token();
- token = peek_token();
- if(!is_interface_qualifier(token))
- throw runtime_error(format_syntax_error("an interface qualifier"));
- }
-
- if(is_interface_qualifier(token))
- var->interface = parse_token();
- else if(token=="const")
- {
- var->constant = true;
+ if(is_interface_qualifier(token))
+ var->interface = token;
+ else if(is_sampling_qualifier(token))
+ var->sampling = token;
+ else if(is_precision_qualifier(token))
+ var->precision = token;
+ else if(token=="const")
+ var->constant = true;
+ token = peek_token();
- if(is_precision_qualifier(token))
- var->precision = parse_token();
-
var->type = expect_type();
var->name = expect_identifier();
var->type = expect_type();
var->name = expect_identifier();