glsl/parser: Extract version directive processing into a function.
authorPaul Berry <stereotype441@gmail.com>
Thu, 2 Aug 2012 18:02:55 +0000 (11:02 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 6 Dec 2012 20:13:21 +0000 (12:13 -0800)
commit629b9edc99a0b662cf907b9e068be2fd6ac5ae26
tree1928c767aa184a98290c7b34ab586f70f7525381
parenta03c2c7ab958f024eb77d986285ae294ad459706
glsl/parser: Extract version directive processing into a function.

Version directive handling is going to have to be used within two
parser rules, one for desktop-style version directives (e.g. "#version
130") and one for the new ES-style version directive (e.g. "#version
300 es"), so this patch moves it to a function that can be called from
both rules.

No functional change.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Carl Worth <cworth@cworth.org>
src/glsl/glsl_parser.yy
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h