summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-03-16 12:04:22 +0000
committerLex Spoon <lex@lexspoon.org>2007-03-16 12:04:22 +0000
commit5b99970b2720affc8e744499a0d64b02619e926a (patch)
treea8c563ba53331b19ab8e32b476370fe20dd97ca9
parent73d2dd4ed4db77751b3696d7705255a14872bc23 (diff)
downloadscala-5b99970b2720affc8e744499a0d64b02619e926a.tar.gz
scala-5b99970b2720affc8e744499a0d64b02619e926a.tar.bz2
scala-5b99970b2720affc8e744499a0d64b02619e926a.zip
at the end of input, return an infinite stream ...
at the end of input, return an infinite stream of SU's
-rw-r--r--src/compiler/scala/tools/nsc/util/CharArrayReader.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/util/CharArrayReader.scala b/src/compiler/scala/tools/nsc/util/CharArrayReader.scala
index cb6cf200fe..f11061e30d 100644
--- a/src/compiler/scala/tools/nsc/util/CharArrayReader.scala
+++ b/src/compiler/scala/tools/nsc/util/CharArrayReader.scala
@@ -50,6 +50,7 @@ class CharArrayReader(buf: Array[char], start: int, /* startline: int, startcol:
def next: unit = {
//cline = nextline
//ccol = nextcol
+ if(!hasNext) return SU // there is an endless stream of SU's at the end
ch = buf(bp)
isUnicode = false
bp = bp + 1