com.intellij.lang
Interface PsiParser
public interface PsiParser
The plugin side of a custom language parser. Receives tokens returned from
lexer and builds an AST tree out of them.
- See Also:
ParserDefinition.createParser(com.intellij.openapi.project.Project)
|
Method Summary |
ASTNode |
parse(IElementType root,
PsiBuilder builder)
Parses the contents of the specified PSI builder and returns an AST tree with the
specified type of root element. |
parse
@NotNull
ASTNode parse(IElementType root,
PsiBuilder builder)
- Parses the contents of the specified PSI builder and returns an AST tree with the
specified type of root element. The PSI builder contents is the entire file
or (if chameleon tokens are used) the text of a chameleon token which needs to
be reparsed.
- Parameters:
root - the type of the root element in the AST tree.builder - the builder which is used to retrieve the original file tokens and build the AST tree.
- Returns:
- the root of the resulting AST tree.