com.intellij.lang
Interface PsiBuilder.Marker

Enclosing interface:
PsiBuilder

public static interface PsiBuilder.Marker

A marker defines a range in the document text which becomes a node in the AST tree. The ranges defined by markers within the text range of the current marker become child nodes of the node defined by the current marker.


Method Summary
 void done(IElementType type)
          Completes this marker and labels it with the specified AST node type.
 void drop()
          Drops this marker.
 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.
 

Method Detail

precede

PsiBuilder.Marker precede()
Creates and returns a new marker starting immediately before the start of this marker and extending after its end. Can be called only on a completed marker.

Returns:
the new marker instance.

drop

void drop()
Drops this marker. Can be called after other markers have been added and completed after this marker. Does not affect lexer position or markers added after this marker.


rollbackTo

void rollbackTo()
Drops this marker and all markers added after it, and reverts the lexer position to the position of this marker.


done

void done(IElementType type)
Completes this marker and labels it with the specified AST node type. Before calling this method, all markers added after the beginning of this marker must be either dropped or completed.

Parameters:
type - the type of the node in the AST tree.