diff options
Diffstat (limited to 'glsl_parser.ypp')
-rw-r--r-- | glsl_parser.ypp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/glsl_parser.ypp b/glsl_parser.ypp index b8c01b508d0..250c51c7ee3 100644 --- a/glsl_parser.ypp +++ b/glsl_parser.ypp @@ -190,13 +190,13 @@ translation_unit: { _mesa_glsl_initialize_types(state); } - external_declaration_list + extension_statement_list external_declaration_list | { state->language_version = 110; _mesa_glsl_initialize_types(state); } - external_declaration_list + extension_statement_list external_declaration_list ; version_statement: @@ -217,6 +217,20 @@ version_statement: } ; +extension_statement_list: + + | extension_statement_list extension_statement + ; + +extension_statement: + EXTENSION IDENTIFIER COLON IDENTIFIER EOL + { + if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) { + YYERROR; + } + } + ; + external_declaration_list: external_declaration { |