diff options
author | Carl Worth <[email protected]> | 2014-06-25 11:52:02 -0700 |
---|---|---|
committer | Carl Worth <[email protected]> | 2014-07-29 15:11:49 -0700 |
commit | 0d5f5d127b2ccac29b12bc7377ccd8cd5b29c70b (patch) | |
tree | 9311326d8e3235bb5403db1d6a9b9cf4dd524db9 /src/glsl/glsl_lexer.ll | |
parent | 2fdc1f50c46b7f0a6abd8b2ef4739ac96958cb0a (diff) |
glsl/glcpp: Don't use start-condition stack when switching to/from <DEFINE>
This commit does not cause any behavioral change for any valid program. Prior
to entering the <DEFINE> start condition, the only valid start condition is
<INITIAL>, so whether pushing/popping <DEFINE> onto the stack or explicit
returning to <INITIAL> is equivalent.
The reason for this change is that we are planning to soon add a start
condition for <HASH> with the following semantics:
<HASH>: We just saw a directive-introducing '#'
<DEFINE>: We just saw "#define" starting a directive
With these two start conditions in place, the only correct behavior is to
leave <DEFINE> by returning to <INITIAL>. But the old push/pop code would have
returned to the <HASH> start condition which would then cause an error when
the next directive-introducing '#' would be encountered.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/glsl_lexer.ll')
0 files changed, 0 insertions, 0 deletions