public abstract class AbstractBlockParser extends Object implements BlockParser
| Constructor and Description |
|---|
AbstractBlockParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLine(SourceLine line) |
void |
addSourceSpan(SourceSpan sourceSpan)
Add a source span of the currently parsed block.
|
boolean |
canContain(Block childBlock) |
boolean |
canHaveLazyContinuationLines()
Return true if the block can have lazy continuation lines.
|
void |
closeBlock() |
boolean |
isContainer()
Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
|
void |
parseInlines(InlineParser inlineParser) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBlock, tryContinuepublic boolean isContainer()
BlockParserisContainer in interface BlockParserpublic boolean canHaveLazyContinuationLines()
BlockParser
Lazy continuation lines are lines that were rejected by this BlockParser.tryContinue(ParserState) but didn't match
any other block parsers either.
If true is returned here, those lines will get added via BlockParser.addLine(SourceLine). For false, the block is
closed instead.
canHaveLazyContinuationLines in interface BlockParserpublic boolean canContain(Block childBlock)
canContain in interface BlockParserpublic void addLine(SourceLine line)
addLine in interface BlockParserpublic void addSourceSpan(SourceSpan sourceSpan)
BlockParserAbstractBlockParser adds
it to the block. Unless you have some complicated parsing where you need to check source positions, you don't
need to override this.addSourceSpan in interface BlockParserpublic void closeBlock()
closeBlock in interface BlockParserpublic void parseInlines(InlineParser inlineParser)
parseInlines in interface BlockParserCopyright © 2021. All rights reserved.