Package com.vladsch.flexmark.parser
Class LightInlineParserImpl
java.lang.Object
com.vladsch.flexmark.parser.LightInlineParserImpl
- All Implemented Interfaces:
LightInlineParser
- Direct Known Subclasses:
InlineParserImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Node
protected ArrayList
<BasedSequence> protected Document
protected int
protected BasedSequence
protected final Parsing
protected final InlineParserOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendNode
(@NotNull Node node) @NotNull Text
appendSeparateText
(@NotNull BasedSequence text) void
appendText
(@NotNull BasedSequence text) void
appendText
(@NotNull BasedSequence text, int beginIndex, int endIndex) boolean
@NotNull Node
getBlock()
@NotNull ArrayList
<BasedSequence> @NotNull Document
int
getIndex()
@NotNull BasedSequence
getInput()
@NotNull InlineParserOptions
@NotNull Parsing
If RE matches at current index in the input, advance index and return the match; otherwise return null.If RE matches at current index in the input, advance index and return the match; otherwise return null.If RE matches at current index in the input, advance index and return the match; otherwise return null.void
boolean
Parse zero or more non-indent spaceschar
peek()
char
peek
(int ahead) void
void
setDocument
(@NotNull Document document) void
setIndex
(int index) void
setInput
(BasedSequence input) boolean
sp()
Parse zero or more spacesboolean
spnl()
Parse zero or more space characters, including at most one newline and zero or more spaces.boolean
spnlUrl()
Parse zero or more space characters, including at one newline.@Nullable BasedSequence
toEOL()
Parse to end of line, including EOL
-
Field Details
-
options
-
myParsing
-
block
-
input
-
index
protected int index -
currentText
-
document
-
-
Constructor Details
-
LightInlineParserImpl
-
-
Method Details
-
getCurrentText
- Specified by:
getCurrentText
in interfaceLightInlineParser
-
getInput
- Specified by:
getInput
in interfaceLightInlineParser
-
setInput
- Specified by:
setInput
in interfaceLightInlineParser
-
getIndex
public int getIndex()- Specified by:
getIndex
in interfaceLightInlineParser
-
setIndex
public void setIndex(int index) - Specified by:
setIndex
in interfaceLightInlineParser
-
getDocument
- Specified by:
getDocument
in interfaceLightInlineParser
-
setDocument
- Specified by:
setDocument
in interfaceLightInlineParser
-
getOptions
- Specified by:
getOptions
in interfaceLightInlineParser
-
getParsing
- Specified by:
getParsing
in interfaceLightInlineParser
-
getBlock
- Specified by:
getBlock
in interfaceLightInlineParser
-
setBlock
- Specified by:
setBlock
in interfaceLightInlineParser
-
moveNodes
- Specified by:
moveNodes
in interfaceLightInlineParser
-
appendText
- Specified by:
appendText
in interfaceLightInlineParser
-
appendText
- Specified by:
appendText
in interfaceLightInlineParser
-
appendNode
- Specified by:
appendNode
in interfaceLightInlineParser
-
appendSeparateText
- Specified by:
appendSeparateText
in interfaceLightInlineParser
-
flushTextNode
public boolean flushTextNode()- Specified by:
flushTextNode
in interfaceLightInlineParser
-
match
If RE matches at current index in the input, advance index and return the match; otherwise return null.- Specified by:
match
in interfaceLightInlineParser
- Parameters:
re
- pattern to match- Returns:
- sequence matched or null
-
matchWithGroups
If RE matches at current index in the input, advance index and return the match; otherwise return null.- Specified by:
matchWithGroups
in interfaceLightInlineParser
- Parameters:
re
- pattern to match- Returns:
- sequence matched or null
-
matcher
If RE matches at current index in the input, advance index and return the match; otherwise return null.- Specified by:
matcher
in interfaceLightInlineParser
- Parameters:
re
- pattern to match- Returns:
- matched matcher or null
-
peek
public char peek()- Specified by:
peek
in interfaceLightInlineParser
- Returns:
- the char at the current input index, or
'\0'
in case there are no more characters.
-
peek
public char peek(int ahead) - Specified by:
peek
in interfaceLightInlineParser
-
spnl
public boolean spnl()Parse zero or more space characters, including at most one newline and zero or more spaces.- Specified by:
spnl
in interfaceLightInlineParser
- Returns:
- true
-
nonIndentSp
public boolean nonIndentSp()Parse zero or more non-indent spaces- Specified by:
nonIndentSp
in interfaceLightInlineParser
- Returns:
- true
-
sp
public boolean sp()Parse zero or more spaces- Specified by:
sp
in interfaceLightInlineParser
- Returns:
- true
-
spnlUrl
public boolean spnlUrl()Parse zero or more space characters, including at one newline.- Specified by:
spnlUrl
in interfaceLightInlineParser
- Returns:
- true
-
toEOL
Parse to end of line, including EOL- Specified by:
toEOL
in interfaceLightInlineParser
- Returns:
- characters parsed or null if no end of line
-