glsl/glcpp: Allow single-line comments immediately after #define
authorCarl Worth <cworth@cworth.org>
Wed, 2 Jul 2014 00:47:29 +0000 (17:47 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 7 Aug 2014 23:08:29 +0000 (16:08 -0700)
commitb4b2a5c3f31f0f66d3ddf1e994c099304d99ed4b
tree75fb1bb3b3a4f10e36826c95b546cde56377dfb7
parentb76482e7312827ab13f37ab9a7e3c8eef30bfe7a
glsl/glcpp: Allow single-line comments immediately after #define

We were already correctly supporting single-line comments in case like:

#define FOO bar // comment here...

The new support added here is simply for the none-too-useful:

#define // comment instead of macro name

With this commit, this line will now give the expected "#define without
macro name" error message instead of the lexer just going off into the
weeds.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glcpp/glcpp-lex.l