|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PsiBuilder
The IDEA side of a custom language parser. Provides lexing results to the plugin and allows the plugin to build the AST tree.
PsiParser,
ASTNode| Nested Class Summary | |
|---|---|
static interface |
PsiBuilder.Marker
A marker defines a range in the document text which becomes a node in the AST tree. |
| Method Summary | |
|---|---|
void |
advanceLexer()
Advances the lexer to the next token, skipping whitespace and comment tokens. |
boolean |
eof()
Checks if the lexer has reached the end of file. |
void |
error(java.lang.String messageText)
Adds an error marker with the specified message text at the current position in the tree. |
int |
getCurrentOffset()
Returns the start offset of the current token, or the file length when the lexing is over. |
java.lang.CharSequence |
getOriginalText()
Returns the complete text being parsed. |
java.lang.String |
getTokenText()
Returns the text of the current token from the lexer. |
IElementType |
getTokenType()
Returns the type of current token from the lexer. |
ASTNode |
getTreeBuilt()
Returns the result of the parsing. |
PsiBuilder.Marker |
mark()
Creates a marker at the current parsing position. |
void |
setDebugMode(boolean dbgMode)
Enables or disables the builder debug mode. |
| Method Detail |
|---|
java.lang.CharSequence getOriginalText()
void advanceLexer()
@Nullable IElementType getTokenType()
@Nullable java.lang.String getTokenText()
int getCurrentOffset()
PsiBuilder.Marker mark()
void error(java.lang.String messageText)
messageText - the text of the error message displayed to the user.boolean eof()
ASTNode getTreeBuilt()
void setDebugMode(boolean dbgMode)
dbgMode - the debug mode value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||