Align on FileStart/FileEnd for naming. (#3428)

The lexer has been using EndOfFile form (stemming from EOF), parser went
to FileEnd form. This consolidates on FileEnd form.
This commit is contained in:
Jon Ross-Perkins
2023-11-29 16:36:57 +00:00
committed by GitHub
parent 239f8030a4
commit 3f208e27f9
28 changed files with 147 additions and 149 deletions
+4 -4
View File
@@ -76,12 +76,12 @@ class ToolchainFileTest : public FileTestBase {
check_line = "// CHECK:STDOUT: {{.*}}";
}
} else if (component_ == "lex") {
// Both StartOfFile and EndOfFile regularly have locations on CHECK
// Both FileStart and FileEnd regularly have locations on CHECK
// comment lines that don't work correctly. The line happens to be correct
// for the EndOfFile, but we need to avoid checking the column.
// The column happens to be right for StartOfFile, but the line is wrong.
// for the FileEnd, but we need to avoid checking the column.
// The column happens to be right for FileStart, but the line is wrong.
static RE2 file_token_re(
R"((EndOfFile.*column: |StartOfFile.*line: )( *\d+))");
R"((FileEnd.*column: |FileStart.*line: )( *\d+))");
RE2::Replace(&check_line, file_token_re, R"(\1{{ *\\d+}})");
} else {
return FileTestBase::DoExtraCheckReplacements(check_line);