Package org.eclipse.cdt.core.dom.parser
Interface ISourceCodeParser
public interface ISourceCodeParser
Interface 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
Modifier and TypeMethodDescriptionvoid
cancel()
Cancel the parsing.boolean
Check whether there were errors.Compute anIASTCompletionNode
for code completion.parse()
Compute an abstract syntax tree (AST).
-
Method Details
-
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:
true
if there were errors
-
getCompletionNode
IASTCompletionNode getCompletionNode()Compute anIASTCompletionNode
for code completion.- Returns:
- a completion node or
null
if none could be computed - Throws:
ParseError
- if parsing has been cancelled or for other reasons
-