glcpp: Reject #version after the version has been resolved.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74166 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Carl Worth <cworth@cworth.org>
This commit is contained in:
parent
9d4a6bd6bb
commit
3f49a8c9a5
|
@ -375,9 +375,15 @@ control_line:
|
|||
_glcpp_parser_skip_stack_pop (parser, & @1);
|
||||
} NEWLINE
|
||||
| HASH_VERSION integer_constant NEWLINE {
|
||||
if (parser->version_resolved) {
|
||||
glcpp_error(& @1, parser, "#version must appear on the first line");
|
||||
}
|
||||
_glcpp_parser_handle_version_declaration(parser, $2, NULL, true);
|
||||
}
|
||||
| HASH_VERSION integer_constant IDENTIFIER NEWLINE {
|
||||
if (parser->version_resolved) {
|
||||
glcpp_error(& @1, parser, "#version must appear on the first line");
|
||||
}
|
||||
_glcpp_parser_handle_version_declaration(parser, $2, $3, true);
|
||||
}
|
||||
| HASH NEWLINE {
|
||||
|
|
Loading…
Reference in New Issue