diff options
author | Carl Worth <[email protected]> | 2014-07-28 08:59:25 -0700 |
---|---|---|
committer | Carl Worth <[email protected]> | 2014-07-29 15:11:48 -0700 |
commit | da7f226a2711450bf92dcc9e2e1e1052111683ff (patch) | |
tree | c8ed217e39b0ce10335b626856c5ca64467b26bb /src/glsl/glcpp/tests | |
parent | 49e2275d0d67696662b4e0008a72b9004826feed (diff) |
glsl/glcpp: Fix to emit spaces following directives
The glcpp lexer and parser use the space_tokens state bit to avoid emitting
tokens for spaces while parsing a directive. Previously, this bit was only
being set again by the first non-space token following a directive.
This led to a bug where a space, (or a comment that should emit a space),
immediately following a directive, (optionally searated by newlines), would be
omitted from the output.
Here we fix the bug by also setting the space_tokens bit whenever we lex a
newline in the standard start conditions.
Diffstat (limited to 'src/glsl/glcpp/tests')
-rw-r--r-- | src/glsl/glcpp/tests/125-es-short-circuit-undefined.c.expected | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/glcpp/tests/125-es-short-circuit-undefined.c.expected b/src/glsl/glcpp/tests/125-es-short-circuit-undefined.c.expected index 93bcffb47c8..ce5c102ed33 100644 --- a/src/glsl/glcpp/tests/125-es-short-circuit-undefined.c.expected +++ b/src/glsl/glcpp/tests/125-es-short-circuit-undefined.c.expected @@ -8,6 +8,7 @@ #version 300 es + @@ -15,8 +16,7 @@ - - + Success |