[flang] fix previous changes after testing

Original-commit: flang-compiler/f18@c088704f13
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
This commit is contained in:
peter klausler 2018-05-09 16:06:57 -07:00
parent a726229c3a
commit 41aec2d65e
1 changed files with 10 additions and 6 deletions

View File

@ -735,9 +735,9 @@ const char *Prescanner::FreeFormContinuationLine(bool ampersand) {
if (p >= limit_) {
return nullptr;
}
for (; *p == ' ' || *p == '\t'; ++p) {
}
if (directiveSentinel_ != nullptr) {
for (; *p == ' ' || *p == '\t'; ++p) {
}
if (*p++ != '!') {
return nullptr;
}
@ -749,22 +749,26 @@ const char *Prescanner::FreeFormContinuationLine(bool ampersand) {
for (; *p == ' ' || *p == '\t'; ++p) {
}
if (*p == '&') {
++p;
} else if (!ampersand) {
return p + 1;
} else if (ampersand) {
return p;
} else {
return nullptr;
}
} else {
if (*p == '&') {
++p;
return p + 1;
} else if (*p == '!' || *p == '\n') {
return nullptr;
} else if (ampersand || delimiterNesting_ > 0) {
if (p > lineStart_) {
--p;
}
return p;
} else {
return nullptr;
}
}
return p;
}
bool Prescanner::FixedFormContinuation() {