Package io.deephaven.lang.generated
Class BaseToken
- java.lang.Object
-
- io.deephaven.lang.generated.BaseToken
-
-
Field Summary
Fields Modifier and Type Field Description booleandetachedintendIndexintstartIndexinttokenBegin
-
Constructor Summary
Constructors Constructor Description BaseToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenaddBackLinks()TokenaddBackLinks(Token until)intcompareTo(BaseToken o)booleancontains(io.deephaven.proto.backplane.script.grpc.DocumentRangeOrBuilder replaceRange)booleancontainsIndex(int desired)booleancontainsPosition(io.deephaven.proto.backplane.script.grpc.PositionOrBuilder pos)voidcopyToken(Token token)java.lang.Stringdump()intgetEndIndex()TokengetNextNonWhitespace()intgetStartIndex()Tokennext()io.deephaven.proto.backplane.script.grpc.Position.BuilderpositionEnd()Converts our 1-indexed javacc end token to a 0-indexed LSP Position.io.deephaven.proto.backplane.script.grpc.Position.BuilderpositionEnd(boolean considerEof)Converts our 1-indexed javacc end token to a 0-indexed LSP Position.io.deephaven.proto.backplane.script.grpc.Position.BuilderpositionStart()Converts our 1-indexed javacc start token to a 0-indexed LSP PositionTokenprev()Tokenspecial()intspecialTokenLength()io.deephaven.web.shared.fu.MappedIterable<Token>to(Token end)io.deephaven.web.shared.fu.MappedIterable<Token>toReverse(Token end)Returns an iterable which runs backwards from this token.
-
-
-
Method Detail
-
addBackLinks
public Token addBackLinks()
-
prev
public Token prev()
-
compareTo
public int compareTo(BaseToken o)
- Specified by:
compareToin interfacejava.lang.Comparable<BaseToken>
-
containsIndex
public boolean containsIndex(int desired)
-
getEndIndex
public int getEndIndex()
-
getStartIndex
public int getStartIndex()
-
specialTokenLength
public int specialTokenLength()
-
copyToken
public void copyToken(Token token)
-
next
public Token next()
-
special
public Token special()
-
getNextNonWhitespace
public Token getNextNonWhitespace()
-
dump
public java.lang.String dump()
-
positionStart
public io.deephaven.proto.backplane.script.grpc.Position.Builder positionStart()
Converts our 1-indexed javacc start token to a 0-indexed LSP Position
-
positionEnd
public io.deephaven.proto.backplane.script.grpc.Position.Builder positionEnd()
Converts our 1-indexed javacc end token to a 0-indexed LSP Position. Does not consider javacc's weird EOF handling specially; the final end position will land outside the document's actual range, which is perfectly acceptable to Monaco when telling it what chars to replace (it's actually required when the cursor is at the end of the document; a common occurrence).
-
positionEnd
public io.deephaven.proto.backplane.script.grpc.Position.Builder positionEnd(boolean considerEof)
Converts our 1-indexed javacc end token to a 0-indexed LSP Position.- Parameters:
considerEof- Whether or not to normalize javacc's weird EOF token handling. Normally false, which allows the position to exceed the document's size. This is acceptable to Monaco. EOF is only considered during internal operations when we are looking up tokens from cursor positions (and can likely be refactored / deleted when we stop using absolute cursor positions).- Returns:
- A 0-indexed Position describing the end of this token.
-
toReverse
public io.deephaven.web.shared.fu.MappedIterable<Token> toReverse(Token end)
Returns an iterable which runs backwards from this token. If you specify an end token, the iterator will include that token and stop. If an end token is not specified, the iterable will run backwards until the start token.- Parameters:
end- optional end token, if specified, will be the last token returned by iterator.
-
containsPosition
public boolean containsPosition(io.deephaven.proto.backplane.script.grpc.PositionOrBuilder pos)
-
contains
public boolean contains(io.deephaven.proto.backplane.script.grpc.DocumentRangeOrBuilder replaceRange)
-
-