public static interface PsiBuilder.Marker
Modifier and Type | Method and Description |
---|---|
void |
collapse(IElementType type)
Like done(IElementType), but collapses all tokens between start and end markers
into single leaf node of given type.
|
void |
done(IElementType type)
Completes this marker and labels it with the specified AST node type.
|
void |
doneBefore(IElementType type,
PsiBuilder.Marker before)
Like done(IElementType), but the marker is completed (end marker inserted)
before specified one.
|
void |
doneBefore(IElementType type,
PsiBuilder.Marker before,
java.lang.String errorMessage)
Like #doneBefore(IElementType, Marker), but in addition an error element with given text
is inserted right before this marker's end.
|
void |
drop()
Drops this marker.
|
void |
error(java.lang.String message)
Completes this marker and labels it as error element with specified message.
|
void |
errorBefore(java.lang.String message,
PsiBuilder.Marker before)
Like error(String), but the marker is completed before specified one.
|
PsiBuilder.Marker |
precede()
Creates and returns a new marker starting immediately before the start of
this marker and extending after its end.
|
void |
rollbackTo()
Drops this marker and all markers added after it, and reverts the lexer position to the
position of this marker.
|
void |
setCustomEdgeTokenBinders(WhitespacesAndCommentsBinder left,
WhitespacesAndCommentsBinder right)
Allows to define custom edge token binders instead of default ones.
|
PsiBuilder.Marker precede()
void drop()
void rollbackTo()
void done(IElementType type)
type
- the type of the node in the AST tree.void collapse(IElementType type)
type
- the type of the node in the AST tree.void doneBefore(IElementType type, PsiBuilder.Marker before)
type
- the type of the node in the AST tree.before
- marker to complete this one before.void doneBefore(IElementType type, PsiBuilder.Marker before, java.lang.String errorMessage)
type
- the type of the node in the AST tree.before
- marker to complete this one before.errorMessage
- for error element.void error(java.lang.String message)
message
- for error element.void errorBefore(java.lang.String message, PsiBuilder.Marker before)
message
- for error element.before
- marker to complete this one before.void setCustomEdgeTokenBinders(WhitespacesAndCommentsBinder left, WhitespacesAndCommentsBinder right)
left
- new left edge token binder.right
- new right edge token binder.