in scala/io
class Source

abstract class Source()
extends Iterator[Char]
with ScalaObject

an iterable representation of source files. calling method reset returns an identical, resetted source
Author:
buraq

Field Summary
protected abstract val iter: Iterator[Char]
     the actual iterator

Method Summary
protected var ccol: Int
  var ch: Char
     the last character returned by next.
protected var cline: Int
  var descr: String
     description of this source, default empty
  def getLine(line: Int): String
     convenience method, returns given line (not including newline) from Source
  def hasNext: Boolean
     returns true if this source has more characters
  var nerrors: Int
  def next: Char
     returns next character and has the following side-effects: updates position (ccol and cline) and assigns the character to ch
  var nwarnings: Int
  var pos: Int
     position of last character returned by next
  def report(pos: Int, msg: String, out: java.io.PrintStream): Unit
  def reportError(pos: Int, msg: String): Unit
     reports an error message to console
  def reportError(pos: Int, msg: String, out: java.io.PrintStream): Unit
  def reportWarning(pos: Int, msg: String): Unit
     reports a warning message to java.lang.System.out
  def reportWarning(pos: Int, msg: String, out: java.io.PrintStream): Unit
abstract def reset: Source
     the actual reset method
  var tabinc: Int
     default col increment for tabs '\t', set to 4 initially

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterator-class
/:, :\, append, buffered, contains, copyToArray, drop, duplicate, exists, filter, find, flatMap, foldLeft, foldRight, forall, foreach, map, take, toList, zip

Methods inherited from scala/ScalaObject-class
getScalaType

Field Detail

iter

  protected abstract val iter: Iterator[Char]
the actual iterator
Method Detail

cline

  protected var cline: Int

ccol

  protected var ccol: Int

pos

  var pos: Int
position of last character returned by next

ch

  var ch: Char
the last character returned by next. the value before the first call to next is undefined.

descr

  var descr: String
description of this source, default empty

nerrors

  var nerrors: Int

nwarnings

  var nwarnings: Int

tabinc

  var tabinc: Int
default col increment for tabs '\t', set to 4 initially

getLine

  def getLine(line: Int): String
convenience method, returns given line (not including newline) from Source

hasNext

  def hasNext: Boolean
returns true if this source has more characters

next

  def next: Char
returns next character and has the following side-effects: updates position (ccol and cline) and assigns the character to ch

reportError

  def reportError(pos: Int, msg: String): Unit
reports an error message to console

reportError

  def reportError(pos: Int, msg: String, out: java.io.PrintStream): Unit

report

  def report(pos: Int, msg: String, out: java.io.PrintStream): Unit

reportWarning

  def reportWarning(pos: Int, msg: String): Unit
reports a warning message to java.lang.System.out

reportWarning

  def reportWarning(pos: Int, msg: String, out: java.io.PrintStream): Unit

reset

  abstract def reset: Source
the actual reset method