Package org.eclipse.cdt.core.dom.parser
Interface ISourceCodeParser
-
public interface ISourceCodeParserInterface for an AST source code parser.- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel()Cancel the parsing.booleanencounteredError()Check whether there were errors.IASTCompletionNodegetCompletionNode()Compute anIASTCompletionNodefor code completion.IASTTranslationUnitparse()Compute an abstract syntax tree (AST).
-
-
-
Method Detail
-
parse
IASTTranslationUnit parse()
Compute an abstract syntax tree (AST). The returned AST is frozen, any attempt modify any of the nodes in the AST will result in an IllegalStateException.- Returns:
- the AST, should not return
null - Throws:
ParseError- if parsing has been cancelled or for other reasons
-
cancel
void cancel()
Cancel the parsing.
-
encounteredError
boolean encounteredError()
Check whether there were errors.- Returns:
trueif there were errors
-
getCompletionNode
IASTCompletionNode getCompletionNode()
Compute anIASTCompletionNodefor code completion.- Returns:
- a completion node or
nullif none could be computed - Throws:
ParseError- if parsing has been cancelled or for other reasons
-
-