[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 15:10:45 PDT 2020


klausler updated this revision to Diff 273840.
klausler added a comment.

Rename function.


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.273840.patch
Type: text/x-patch
Size: 1215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200626/945017d4/attachment-0001.bin>


More information about the flang-commits mailing list