[flang-commits] [PATCH] D82687: [flang] Fix line continuation after bare labels (fm200.f)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jun 26 17:11:52 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5fb5f7b5ab34: [flang] Fix line continuation after bare labels (fm200.f) (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82687/new/

https://reviews.llvm.org/D82687

Files:
  flang/lib/Parser/prescan.cpp
  flang/lib/Parser/prescan.h


Index: flang/lib/Parser/prescan.h
===================================================================
--- flang/lib/Parser/prescan.h
+++ flang/lib/Parser/prescan.h
@@ -147,6 +147,7 @@
   void SkipToEndOfLine();
   bool MustSkipToEndOfLine() const;
   void NextChar();
+  void SkipToNextSignificantCharacter();
   void SkipCComments();
   void SkipSpaces();
   static const char *SkipWhiteSpace(const char *);
Index: flang/lib/Parser/prescan.cpp
===================================================================
--- flang/lib/Parser/prescan.cpp
+++ flang/lib/Parser/prescan.cpp
@@ -272,6 +272,7 @@
       token.CloseToken();
     }
   }
+  SkipToNextSignificantCharacter();
 }
 
 void Prescanner::SkipToEndOfLine() {
@@ -298,6 +299,14 @@
     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 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82687.273867.patch
Type: text/x-patch
Size: 1215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200627/53b0544a/attachment.bin>


More information about the flang-commits mailing list