Package snap.parse

Class TokenLine

java.lang.Object
snap.parse.TokenLine
All Implemented Interfaces:
CharSequence, CharSequenceX

public class TokenLine extends Object implements CharSequenceX
This class represents a line
  • Field Details

    • _chars

      protected CharSequence _chars
    • _lineIndex

      protected int _lineIndex
  • Constructor Details

    • TokenLine

      public TokenLine(TokenDoc tokenDoc, int startCharIndex, int endCharIndex, int lineIndex)
      Constructor.
  • Method Details

    • getStartCharIndex

      public int getStartCharIndex()
      Returns the start char index in source CharLines.
    • getEndCharIndex

      public int getEndCharIndex()
      Returns the end char index in source CharLines.
    • getLineIndex

      public int getLineIndex()
      Returns the line index for this line.
    • getNext

      public TokenLine getNext()
      Returns the next line.
    • getPrevious

      public TokenLine getPrevious()
      Returns the previous line.
    • getSpecialTokens

      public ParseToken[] getSpecialTokens()
      Returns the special tokens in line.
    • addSpecialToken

      protected void addSpecialToken(ParseToken aToken)
      Adds a special token to line.
    • length

      public int length()
      CharSequence method.
      Specified by:
      length in interface CharSequence
    • charAt

      public char charAt(int charIndex)
      CharSequence method.
      Specified by:
      charAt in interface CharSequence
    • subSequence

      public CharSequence subSequence(int startCharIndex, int endCharIndex)
      CharSequence method.
      Specified by:
      subSequence in interface CharSequence