- 所有已知实现类:
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.
-
方法概要
修饰符和类型方法说明@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.
-
方法详细资料
-
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.- 参数:
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.- 返回:
- the root of the resulting AST tree.
-