|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ParserDefinition
Defines the implementation of a parser for a custom language.
Language.getParserDefinition()| Method Summary | |
|---|---|
PsiElement |
createElement(ASTNode node)
Creates a PSI element for the specified AST node. |
PsiFile |
createFile(Project project,
java.lang.String name,
java.lang.CharSequence text)
Creates a PSI element for the file with the specified name and contents. |
PsiFile |
createFile(Project project,
VirtualFile file)
Creates a PSI element for the specified virtual file. |
Lexer |
createLexer(Project project)
Returns the lexer for lexing files in the specified project. |
PsiParser |
createParser(Project project)
Returns the parser for parsing files in the specified project. |
TokenSet |
getCommentTokens()
Returns the set of token types which are treated as comments by the PSI builder. |
IFileElementType |
getFileNodeType()
Returns the element type of the node describing a file in the specified language. |
TokenSet |
getWhitespaceTokens()
Returns the set of token types which are treated as whitespace by the PSI builder. |
| Method Detail |
|---|
@NotNull Lexer createLexer(Project project)
project - the project to which the lexer is connected.
@NotNull PsiParser createParser(Project project)
project - the project to which the parser is connected.
IFileElementType getFileNodeType()
@NotNull TokenSet getWhitespaceTokens()
@NotNull TokenSet getCommentTokens()
@NotNull PsiElement createElement(ASTNode node)
node - the node for which the PSI element should be returned.
PsiFile createFile(Project project,
VirtualFile file)
project - the project to which the file belongs.file - the file for which the PSI element is created.
PsiFile createFile(Project project,
java.lang.String name,
java.lang.CharSequence text)
project - the project to which the file belongs.name - The name of the file.text - The contents of the file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||