diff options
author | 2010-02-07 09:38:27 -0500 | |
---|---|---|
committer | 2010-02-07 09:38:27 -0500 | |
commit | 10b8344731e3ba5158321372716c405f3363695f (patch) | |
tree | 6b5002384a4f6f6a6ad3ef8e23760fc24e23c244 | |
parent | 94ef8c3721548c3125fff96c8426921936287a7e (diff) |
Fix detection of blank lines in .urp
-rw-r--r-- | src/compiler.sml | 13 |
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 ()) |