org.quasiliteral.syntax
Class TwineFeeder

java.lang.Object
  |
  +--org.quasiliteral.syntax.TwineFeeder
All Implemented Interfaces:
LineFeeder

public class TwineFeeder
extends Object
implements LineFeeder

Untamed: For feeding in one line of Twine at a time taken from a dynamically provided Twine source.

Author:
Mark S. Miller

Field Summary
private  int myPos
           
private  Twine mySource
           
 
Constructor Summary
TwineFeeder(Twine sourceCode)
          Enabled:
 
Method Summary
 Twine optNextLine(boolean atTop, boolean quoted, int indent, char closer, int closeIndent)
          Enabled:
 String toString()
          Suppressed:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mySource

private final Twine mySource

myPos

private int myPos
Constructor Detail

TwineFeeder

public TwineFeeder(Twine sourceCode)
Enabled:

Method Detail

toString

public String toString()
Suppressed:

Overrides:
toString in class Object
Returns:
a string representation of the object.

optNextLine

public Twine optNextLine(boolean atTop,
                         boolean quoted,
                         int indent,
                         char closer,
                         int closeIndent)
Enabled:

Specified by:
optNextLine in interface LineFeeder
Parameters:
atTop - Is this the beginning of a top-level unit (typically, a top-level expression)?
quoted - Will this next line be taken as literal text? If so, then it should not be trimmed or indented. 'quoted' is true between double quotes, or between quasi-quotes when not inside a $ or @ hole.
indent - The suggested indentation level for the next line, unless the next line begins with closer.
closer - The character that would close the most recent unclosed openner.
closeIndent - The suggested indentation level for the next line if it does begin (after trimming) with closer.


comments?