mirror of
https://github.com/intel/llvm.git
synced 2026-01-31 07:27:33 +08:00
[flang] Fix line continuation after bare labels (fm200.f)
Fixed-form line continuation was not working when the preceding line was a bare label. Reviewed By: tskeith Differential Revision: https://reviews.llvm.org/D82687
This commit is contained in:
@@ -272,6 +272,7 @@ void Prescanner::LabelField(TokenSequence &token, int outCol) {
|
||||
token.CloseToken();
|
||||
}
|
||||
}
|
||||
SkipToNextSignificantCharacter();
|
||||
}
|
||||
|
||||
void Prescanner::SkipToEndOfLine() {
|
||||
@@ -298,6 +299,14 @@ void Prescanner::NextChar() {
|
||||
at_ += 3;
|
||||
encoding_ = Encoding::UTF_8;
|
||||
}
|
||||
SkipToNextSignificantCharacter();
|
||||
}
|
||||
|
||||
// Skip everything that should be ignored until the next significant
|
||||
// character is reached; handles C-style comments in preprocessing
|
||||
// directives, Fortran ! comments, stuff after the right margin in
|
||||
// fixed form, and all forms of line continuation.
|
||||
void Prescanner::SkipToNextSignificantCharacter() {
|
||||
if (inPreprocessorDirective_) {
|
||||
SkipCComments();
|
||||
} else {
|
||||
|
||||
@@ -147,6 +147,7 @@ private:
|
||||
void SkipToEndOfLine();
|
||||
bool MustSkipToEndOfLine() const;
|
||||
void NextChar();
|
||||
void SkipToNextSignificantCharacter();
|
||||
void SkipCComments();
|
||||
void SkipSpaces();
|
||||
static const char *SkipWhiteSpace(const char *);
|
||||
|
||||
Reference in New Issue
Block a user