glcpp: Fix source numbers set with "#line LINE_NUMBER SOURCE_NUMBER"
authorCarl Worth <cworth@cworth.org>
Mon, 23 Aug 2010 16:29:49 +0000 (09:29 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 23 Aug 2010 17:48:10 +0000 (10:48 -0700)
commitff10d239af3b48f4ba13a0ef947e97d3302ea818
treed9e1e2f9d7ffd7bf4e7be897b5a1792b44a00d44
parent2a9e791fdeb45080a98042d41c153ea19c17caae
glcpp: Fix source numbers set with "#line LINE_NUMBER SOURCE_NUMBER"

Previously, the YY_USER_ACTION was overwriting the yylloc->source value
in every action, (after that value had been carefully set by the handling
of the #line directive). Instead, we want to initialize it once in
YY_USER_INIT and then not touch it at all in YY_USER_ACTION.
src/glsl/glcpp/glcpp-lex.l