- All Known Implementing Classes:
AbstractIndentParser
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:
-
Method Summary
Modifier and TypeMethodDescription@NotNull ASTNodeparse(@NotNull IElementType root, @NotNull PsiBuilder builder) Parses the contents of the specified PSI builder and returns an AST tree with the specified type of root element.
-
Method Details
-
parse
@NotNull @NotNull ASTNode parse(@NotNull @NotNull IElementType root, @NotNull @NotNull 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.
-