org.quasiliteral.syntax
Interface LineFeeder

All Known Implementing Classes:
FileFeeder, PrettyFeeder, QuasiFeeder, TwineFeeder

public interface LineFeeder

Untamed: Where the lexer gets its input from, one line of Twine at a time.

Author:
Mark S. Miller

Method Summary
 Twine optNextLine(boolean atTop, boolean quoted, int indent, char closer, int closeIndent)
          Enabled: Returns either a Twine containing the next line of input (and presumably memory of where it came from), or null meaning end of input (EOF).
 

Method Detail

optNextLine

public Twine optNextLine(boolean atTop,
                         boolean quoted,
                         int indent,
                         char closer,
                         int closeIndent)
                  throws IOException
Enabled: Returns either a Twine containing the next line of input (and presumably memory of where it came from), or null meaning end of input (EOF). The parameters are for indentation-smart prompting or pretty printing.

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.
IOException


comments?