summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2014-06-20 14:58:48 -0700
committerCarl Worth <[email protected]>2014-07-29 15:11:49 -0700
commit828686d4ebe055d1c6583192bc57742e101ff931 (patch)
treefe6825369bfd1e755dd8b4f83e7121bc8e3744dc /src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
parent5dbdc341e8e8502ab5d98784a24b54c6f3907472 (diff)
glsl/glcpp: Drop extra, final newline from most output
The glcpp parser is line-based, so it needs to see a NEWLINE token at the end of each line. This causes a trick for files that end without a final newline. Previously, the lexer for glcpp punted in this case by unconditionally returning a NEWLINE token at end-of-file, (causing most files to have an extra blank line at the end). Here, we refine this by lexing end-of-file as a NEWLINE token only if the immediately preceding token was not a NEWLINE token. The patch is a minor change that only looks huge for two reasons: 1. Almost all glcpp test result ".expected" files are updated to drop the extra newline. 2. All return statements from the lexer are adjusted to use a new RETURN_TOKEN macro that tracks the last-token-was-a-newline state. Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected')
-rw-r--r--src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected b/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
index 43d484d7131..c6c9ee38a9e 100644
--- a/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
+++ b/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
@@ -1,4 +1,3 @@
1
-