Package snap.parse
Class TokenLine
java.lang.Object
snap.parse.TokenLine
- All Implemented Interfaces:
CharSequence
,CharSequenceX
This class represents a line
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSpecialToken
(ParseToken aToken) Adds a special token to line.char
charAt
(int charIndex) CharSequence method.int
Returns the end char index in source CharLines.int
Returns the line index for this line.getNext()
Returns the next line.Returns the previous line.Returns the special tokens in line.int
Returns the start char index in source CharLines.int
length()
CharSequence method.subSequence
(int startCharIndex, int endCharIndex) CharSequence method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty, toString
Methods inherited from interface snap.util.CharSequenceX
getIndentLength, getIndentString, getLastChar, indexAfterNewline, indexAfterNewlineOrEnd, indexOfNewline, isAfterLineEnd, isLastCharNewline, isLineEnd, isLineEndChar, isWhiteSpace, lastIndexAfterNewline, lastIndexOfNewline, startsWith
-
Field Details
-
_chars
-
_lineIndex
protected int _lineIndex
-
-
Constructor Details
-
TokenLine
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
Returns the next line. -
getPrevious
Returns the previous line. -
getSpecialTokens
Returns the special tokens in line. -
addSpecialToken
Adds a special token to line. -
length
public int length()CharSequence method.- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int charIndex) CharSequence method.- Specified by:
charAt
in interfaceCharSequence
-
subSequence
CharSequence method.- Specified by:
subSequence
in interfaceCharSequence
-