diff options
author | Carl Worth <[email protected]> | 2014-07-02 22:49:58 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-08-07 16:08:29 -0700 |
commit | f1340745c00617bead8352d314306642138ed0bd (patch) | |
tree | e5cb2f60ae702459820610bd5bbbe7473a0b26b6 /src/glsl/ast_to_hir.cpp | |
parent | ec69e00843ecafcd817b47f22229b84561c5e624 (diff) |
glsl/glcpp: Fix line-continuation code to handle multiple newline flavors
Sometimes the newline separator is a single character, and sometimes it is two
characters. Before we can fold away and line-continuation backslashes, we
identify the flavor of line separator that is in use.
With this identified, we then correctly search for backslashes followed
immediately by the first character of the line separator.
Also, when re-inserting newlines to replace collapsed newlines, we carefully
insert newlines of the same flavor.
With this commit, almost all remaining test are fixed as tested by
glcpp-test-cr-lf:
\r: 142/143 tests pass
\r\n: 142/143 tests pass
\n\r: 143/143 tests pass
(The only remaining failures have nothing to do with the actual pre-processor
code, but are due to a bug in the way the test suite uses grep to try to
extract test-specific command-line options from the source files.)
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
0 files changed, 0 insertions, 0 deletions