Class LightInlineParserImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      LightInlineParserImpl​(com.vladsch.flexmark.util.data.DataHolder dataOptions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendNode​(@NotNull com.vladsch.flexmark.util.ast.Node node)  
      @NotNull Text appendSeparateText​(@NotNull com.vladsch.flexmark.util.sequence.BasedSequence text)  
      void appendText​(@NotNull com.vladsch.flexmark.util.sequence.BasedSequence text)  
      void appendText​(@NotNull com.vladsch.flexmark.util.sequence.BasedSequence text, int beginIndex, int endIndex)  
      boolean flushTextNode()  
      @NotNull com.vladsch.flexmark.util.ast.Node getBlock()  
      @NotNull ArrayList<com.vladsch.flexmark.util.sequence.BasedSequence> getCurrentText()  
      @NotNull com.vladsch.flexmark.util.ast.Document getDocument()  
      int getIndex()  
      @NotNull com.vladsch.flexmark.util.sequence.BasedSequence getInput()  
      @NotNull InlineParserOptions getOptions()  
      @NotNull Parsing getParsing()  
      com.vladsch.flexmark.util.sequence.BasedSequence match​(Pattern re)
      If RE matches at current index in the input, advance index and return the match; otherwise return null.
      Matcher matcher​(Pattern re)
      If RE matches at current index in the input, advance index and return the match; otherwise return null.
      com.vladsch.flexmark.util.sequence.BasedSequence[] matchWithGroups​(Pattern re)
      If RE matches at current index in the input, advance index and return the match; otherwise return null.
      void moveNodes​(@NotNull com.vladsch.flexmark.util.ast.Node fromNode, @NotNull com.vladsch.flexmark.util.ast.Node toNode)  
      boolean nonIndentSp()
      Parse zero or more non-indent spaces
      char peek()  
      char peek​(int ahead)  
      void setBlock​(@NotNull com.vladsch.flexmark.util.ast.Node block)  
      void setDocument​(@NotNull com.vladsch.flexmark.util.ast.Document document)  
      void setIndex​(int index)  
      void setInput​(com.vladsch.flexmark.util.sequence.BasedSequence input)  
      boolean sp()
      Parse zero or more spaces
      boolean 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 com.vladsch.flexmark.util.sequence.BasedSequence toEOL()
      Parse to end of line, including EOL
    • Field Detail

      • myParsing

        protected final Parsing myParsing
      • block

        protected com.vladsch.flexmark.util.ast.Node block
      • input

        protected com.vladsch.flexmark.util.sequence.BasedSequence input
      • index

        protected int index
      • currentText

        protected ArrayList<com.vladsch.flexmark.util.sequence.BasedSequence> currentText
      • document

        protected com.vladsch.flexmark.util.ast.Document document
    • Constructor Detail

      • LightInlineParserImpl

        public LightInlineParserImpl​(com.vladsch.flexmark.util.data.DataHolder dataOptions)
    • Method Detail

      • getInput

        @NotNull
        public @NotNull com.vladsch.flexmark.util.sequence.BasedSequence getInput()
        Specified by:
        getInput in interface LightInlineParser
      • setInput

        public void setInput​(com.vladsch.flexmark.util.sequence.BasedSequence input)
        Specified by:
        setInput in interface LightInlineParser
      • getDocument

        @NotNull
        public @NotNull com.vladsch.flexmark.util.ast.Document getDocument()
        Specified by:
        getDocument in interface LightInlineParser
      • setDocument

        public void setDocument​(@NotNull
                                @NotNull com.vladsch.flexmark.util.ast.Document document)
        Specified by:
        setDocument in interface LightInlineParser
      • getBlock

        @NotNull
        public @NotNull com.vladsch.flexmark.util.ast.Node getBlock()
        Specified by:
        getBlock in interface LightInlineParser
      • setBlock

        public void setBlock​(@NotNull
                             @NotNull com.vladsch.flexmark.util.ast.Node block)
        Specified by:
        setBlock in interface LightInlineParser
      • moveNodes

        public void moveNodes​(@NotNull
                              @NotNull com.vladsch.flexmark.util.ast.Node fromNode,
                              @NotNull
                              @NotNull com.vladsch.flexmark.util.ast.Node toNode)
        Specified by:
        moveNodes in interface LightInlineParser
      • appendText

        public void appendText​(@NotNull
                               @NotNull com.vladsch.flexmark.util.sequence.BasedSequence text)
        Specified by:
        appendText in interface LightInlineParser
      • appendText

        public void appendText​(@NotNull
                               @NotNull com.vladsch.flexmark.util.sequence.BasedSequence text,
                               int beginIndex,
                               int endIndex)
        Specified by:
        appendText in interface LightInlineParser
      • appendNode

        public void appendNode​(@NotNull
                               @NotNull com.vladsch.flexmark.util.ast.Node node)
        Specified by:
        appendNode in interface LightInlineParser
      • appendSeparateText

        @NotNull
        public @NotNull Text appendSeparateText​(@NotNull
                                                @NotNull com.vladsch.flexmark.util.sequence.BasedSequence text)
        Specified by:
        appendSeparateText in interface LightInlineParser
      • match

        public com.vladsch.flexmark.util.sequence.BasedSequence match​(Pattern re)
        If RE matches at current index in the input, advance index and return the match; otherwise return null.
        Specified by:
        match in interface LightInlineParser
        Parameters:
        re - pattern to match
        Returns:
        sequence matched or null
      • matchWithGroups

        public com.vladsch.flexmark.util.sequence.BasedSequence[] matchWithGroups​(Pattern re)
        If RE matches at current index in the input, advance index and return the match; otherwise return null.
        Specified by:
        matchWithGroups in interface LightInlineParser
        Parameters:
        re - pattern to match
        Returns:
        sequence matched or null
      • matcher

        public Matcher matcher​(Pattern re)
        If RE matches at current index in the input, advance index and return the match; otherwise return null.
        Specified by:
        matcher in interface LightInlineParser
        Parameters:
        re - pattern to match
        Returns:
        matched matcher or null
      • peek

        public char peek()
        Specified by:
        peek in interface LightInlineParser
        Returns:
        the char at the current input index, or '\0' in case there are no more characters.
      • spnl

        public boolean spnl()
        Parse zero or more space characters, including at most one newline and zero or more spaces.
        Specified by:
        spnl in interface LightInlineParser
        Returns:
        true
      • nonIndentSp

        public boolean nonIndentSp()
        Parse zero or more non-indent spaces
        Specified by:
        nonIndentSp in interface LightInlineParser
        Returns:
        true
      • sp

        public boolean sp()
        Parse zero or more spaces
        Specified by:
        sp in interface LightInlineParser
        Returns:
        true
      • spnlUrl

        public boolean spnlUrl()
        Parse zero or more space characters, including at one newline.
        Specified by:
        spnlUrl in interface LightInlineParser
        Returns:
        true
      • toEOL

        @Nullable
        public @Nullable com.vladsch.flexmark.util.sequence.BasedSequence toEOL()
        Parse to end of line, including EOL
        Specified by:
        toEOL in interface LightInlineParser
        Returns:
        characters parsed or null if no end of line