|
|
Scala 2.3.3
|
abstract
class
Source
extends java.lang.Object
with scala.Iterator[scala.Char]
with scala.ScalaObject
Source implements an iterable representation
of source files. Calling method reset returns an identical,
resetted source.| Constructor Summary | |
def
this
|
|
| Val Summary | |
abstract protected
|
val
iter
: scala.Iterator[scala.Char]
|
| Var Summary | |
protected
|
var
ccol
: scala.Int
|
var
ch
: scala.Char
the last character returned by next. the value before the first call to next is undefined. |
|
protected
|
var
cline
: scala.Int
|
var
descr
: java.lang.String
description of this source, default empty |
|
var
nerrors
: scala.Int
|
|
var
nwarnings
: scala.Int
|
|
var
pos
: scala.Int
position of last character returned by next |
|
var
tabinc
: scala.Int
default col increment for tabs '\t', set to 4 initially |
|
| Def Summary | |
def
getLine
(line: scala.Int)
: java.lang.String
convenience method, returns given line (not including newline) from Source. |
|
def
getLines
: scala.Iterator[java.lang.String]
returns an iterator who returns lines (including newline character). a line ends in \n. |
|
def
hasNext
: scala.Boolean
Returns true if this source has more characters.
|
|
def
next
: scala.Char
returns next character and has the following side-effects: updates position (ccol and cline) and assigns the character to ch |
|
def
report
(pos: scala.Int, msg: java.lang.String, out: java.io.PrintStream)
: scala.Unit
|
|
def
reportError
(pos: scala.Int, msg: java.lang.String)
: scala.Unit
Reports an error message to console. |
|
def
reportError
(pos: scala.Int, msg: java.lang.String, out: java.io.PrintStream)
: scala.Unit
Reports an error message to the output stream out.
|
|
def
reportWarning
(pos: scala.Int, msg: java.lang.String)
: scala.Unit
Reports a warning message to java.lang.System.out.
|
|
def
reportWarning
(pos: scala.Int, msg: java.lang.String, out: java.io.PrintStream)
: scala.Unit
|
|
abstract
|
def
reset
: scala.io.Source
the actual reset method |
| Def inherited from scala.Iterator[scala.Char] | |
| ++ , /:, :\, append, buffered, contains, copyToArray, copyToBuffer, counted, drop, dropWhile, duplicate, exists, filter, find, flatMap, foldLeft, foldRight, forall, foreach, hasNext, map, next, predicatedIterator, reduceLeft, reduceRight, take, takeWhile, toList, zip, zipWithIndex |
| Constructor Detail |
| Val Detail |
| Var Detail |
protected
var
ccol
: scala.Int
var
ch
: scala.Char
protected
var
cline
: scala.Int
var
descr
: java.lang.String
var
nerrors
: scala.Int
var
nwarnings
: scala.Int
var
pos
: scala.Int
var
tabinc
: scala.Int
| Def Detail |
def
getLine
(line: scala.Int): java.lang.String
line - the line index.
scala.compat.Platform.IllegalArgumentException -
def
getLines
: scala.Iterator[java.lang.String]
def
hasNext
: scala.Boolean
true if this source has more characters.
def
next
: scala.Char
def
report
(pos: scala.Int, msg: java.lang.String, out: java.io.PrintStream): scala.Unit
pos - ...
msg - the error message to report
out - ...
def
reportError
(pos: scala.Int, msg: java.lang.String): scala.Unit
pos - ...
msg - the error message to report
def
reportError
(pos: scala.Int, msg: java.lang.String, out: java.io.PrintStream): scala.Unit
out.pos - ...
msg - the error message to report
out - ...
def
reportWarning
(pos: scala.Int, msg: java.lang.String): scala.Unit
java.lang.System.out.pos - ...
msg - the warning message to report
def
reportWarning
(pos: scala.Int, msg: java.lang.String, out: java.io.PrintStream): scala.Unit
pos - ...
msg - the warning message to report
out - ...
abstract
def
reset
: scala.io.Source