summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index ab3ec10a..cba385e2 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -286,19 +286,12 @@ fun parseUrp' accLibs fname =
val inf = opener ()
- fun hasAnyLine () =
+ fun hasSpaceLine () =
case TextIO.inputLine inf of
NONE => false
- | SOME "\n" => false
- | _ => true
+ | SOME s => CharVector.exists Char.isSpace s orelse hasSpaceLine ()
- fun hasBlankLine () =
- case TextIO.inputLine inf of
- NONE => false
- | SOME "\n" => hasAnyLine ()
- | _ => hasBlankLine ()
-
- val hasBlankLine = hasBlankLine ()
+ val hasBlankLine = hasSpaceLine ()
val inf = (TextIO.closeIn inf; opener ())