public class FigureBlockParser extends java.lang.Object implements BlockParser
FigureBlockParser class.
Constructor and Description |
---|
FigureBlockParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.String line,
ByLineSource source)
accept.
|
private java.lang.String |
appendUntilEmptyLine(ByLineSource source)
Slurp lines from the source starting with the given line appending them together into a StringBuilder until an
empty line is reached, and while the source contains more lines.
|
Block |
visit(java.lang.String line,
ByLineSource source)
visit.
|
public boolean accept(java.lang.String line, ByLineSource source)
accept
in interface BlockParser
line
- the line.source
- the source.public Block visit(java.lang.String line, ByLineSource source) throws ParseException
visit
in interface BlockParser
line
- the line.source
- the source.ParseException
- if any.private java.lang.String appendUntilEmptyLine(ByLineSource source) throws ParseException
source
- the source to read new lines fromParseException