summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/077-else-without-if.c.expected
Commit message (Collapse)AuthorAgeFilesLines
* glsl/glcpp: Fix off-by-one error in column in first-line error messagesCarl Worth2014-07-291-1/+1
| | | | | | | | | | | | | | For the first line we were initializing the column to 1, but for all subsequent lines we were initializing the column to 0. The column number is advanced for each token read before any error message is printed. So the 0 value is the correct initialization, (so that the first column is reported as column 1). With this extremely minor change, many of the .expected files are updated such that error messages for the first line now have the correct column number in them. Reviewed-by: Jordan Justen <[email protected]>
* glsl/glcpp: Minor tweak to wording of error messageCarl Worth2014-07-291-1/+1
| | | | | | It makes more sense to print the directive name with the preceding '#'. Reviewed-by: Jordan Justen <[email protected]>
* glsl/glcpp: Drop extra, final newline from most outputCarl Worth2014-07-291-1/+0
| | | | | | | | | | | | | | | | | | | | 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]>
* glcpp: Add several tests for diagnostics.Carl Worth2010-08-111-0/+4
Which are proving to be useful since some of these tests are not yet acting as desired, (in particular, the unterminated if test is not generating any diagnostic).