|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elang.syntax.PrettyFeeder
Safe: For prettifying source using indentation info.
Field Summary | |
private FlexList |
myBuf
|
private TwineFeeder |
myWrapped
|
private static Twine |
SPACE
|
Constructor Summary | |
PrettyFeeder(Twine sourceCode)
Enabled: |
Method Summary | |
Twine |
getPrettyCode()
Enabled: |
Twine |
optNextLine(boolean atTop,
boolean quoted,
int indent,
char closer,
int closeIndent)
Enabled: |
static Twine |
pretty(Twine sourceCode)
Enabled: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final TwineFeeder myWrapped
private final FlexList myBuf
private static final Twine SPACE
Constructor Detail |
public PrettyFeeder(Twine sourceCode)
Method Detail |
public static Twine pretty(Twine sourceCode) throws IOException
IOException
public Twine optNextLine(boolean atTop, boolean quoted, int indent, char closer, int closeIndent)
optNextLine
in interface LineFeeder
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.public Twine getPrettyCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |