|
Eclipse CDT 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface INodeFactory
Factory for creating AST nodes. This interface contains factory methods
for nodes that are available for both C and C++.
Extending interfaces should use covariant return types where appropriate to
allow the construction of language-specific versions of certain nodes.
Most methods accept child nodes as parameters when constructing a new node.
For convenience it is always allowed to pass null for any of these parameters.
In this case the newly constructed node may be initialized using its
set() and add() methods instead.
Nodes created by this factory are not frozen, i.e. for any node created by this
factory the following holds node.isFrozen() == false .
None of the factory methods should return null.
| Method Detail |
|---|
IASTArrayDeclarator newArrayDeclarator(IASTName name)
IASTArrayModifier newArrayModifier(IASTExpression expr)
IASTArraySubscriptExpression newArraySubscriptExpression(IASTExpression arrayExpr,
IASTExpression subscript)
IASTASMDeclaration newASMDeclaration(java.lang.String assembly)
IASTAttribute newAttribute(char[] name,
IASTToken argumentClause)
IASTBinaryExpression newBinaryExpression(int op,
IASTExpression expr1,
IASTExpression expr2)
IASTBreakStatement newBreakStatement()
IASTCaseStatement newCaseStatement(IASTExpression expr)
IASTCastExpression newCastExpression(int operator,
IASTTypeId typeId,
IASTExpression operand)
IASTCompositeTypeSpecifier newCompositeTypeSpecifier(int key,
IASTName name)
IASTCompoundStatement newCompoundStatement()
IASTConditionalExpression newConditionalExpession(IASTExpression condition,
IASTExpression positive,
IASTExpression negative)
IASTContinueStatement newContinueStatement()
IASTDeclarationStatement newDeclarationStatement(IASTDeclaration declaration)
IASTDeclarator newDeclarator(IASTName name)
IASTDefaultStatement newDefaultStatement()
IASTDoStatement newDoStatement(IASTStatement body,
IASTExpression condition)
IASTElaboratedTypeSpecifier newElaboratedTypeSpecifier(int kind,
IASTName name)
IASTEnumerationSpecifier newEnumerationSpecifier(IASTName name)
IASTEnumerationSpecifier.IASTEnumerator newEnumerator(IASTName name,
IASTExpression value)
IASTEqualsInitializer newEqualsInitializer(IASTInitializerClause initClause)
IASTExpressionList newExpressionList()
IASTExpressionStatement newExpressionStatement(IASTExpression expression)
IASTFieldDeclarator newFieldDeclarator(IASTName name,
IASTExpression bitFieldSize)
IASTFieldReference newFieldReference(IASTName name,
IASTExpression owner)
IASTForStatement newForStatement(IASTStatement init,
IASTExpression condition,
IASTExpression iterationExpression,
IASTStatement body)
@Deprecated
IASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr,
IASTExpression argList)
newFunctionCallExpression(IASTExpression, IASTInitializerClause[])
IASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr,
IASTInitializerClause[] arguments)
IASTStandardFunctionDeclarator newFunctionDeclarator(IASTName name)
IASTFunctionDefinition newFunctionDefinition(IASTDeclSpecifier declSpecifier,
IASTFunctionDeclarator declarator,
IASTStatement bodyStatement)
IGNUASTCompoundStatementExpression newGNUCompoundStatementExpression(IASTCompoundStatement compoundStatement)
IASTGotoStatement newGotoStatement(IASTName name)
IASTIdExpression newIdExpression(IASTName name)
IASTIfStatement newIfStatement(IASTExpression condition,
IASTStatement then,
IASTStatement elseClause)
@Deprecated IASTInitializerExpression newInitializerExpression(IASTExpression expression)
newEqualsInitializer(IASTInitializerClause).
IASTInitializerList newInitializerList()
IASTLabelStatement newLabelStatement(IASTName name,
IASTStatement nestedStatement)
IASTLiteralExpression newLiteralExpression(int kind,
java.lang.String rep)
IASTName newName()
IASTName newName(char[] name)
IASTNullStatement newNullStatement()
IASTParameterDeclaration newParameterDeclaration(IASTDeclSpecifier declSpec,
IASTDeclarator declarator)
IASTPointer newPointer()
IASTProblem newProblem(int id,
char[] arg,
boolean error)
IASTProblemDeclaration newProblemDeclaration(IASTProblem problem)
IASTProblemExpression newProblemExpression(IASTProblem problem)
IASTProblemStatement newProblemStatement(IASTProblem problem)
IASTReturnStatement newReturnStatement(IASTExpression retValue)
IASTSimpleDeclaration newSimpleDeclaration(IASTDeclSpecifier declSpecifier)
IASTSimpleDeclSpecifier newSimpleDeclSpecifier()
IASTSwitchStatement newSwitchStatement(IASTExpression controller,
IASTStatement body)
IASTToken newToken(int tokenType,
char[] tokenImage)
IASTTokenList newTokenList()
@Deprecated IASTTranslationUnit newTranslationUnit()
newTranslationUnit(IScanner).
IASTTranslationUnit newTranslationUnit(org.eclipse.cdt.core.parser.IScanner scanner)
scanner - the preprocessor the translation unit interacts with.IASTNamedTypeSpecifier newTypedefNameSpecifier(IASTName name)
IASTTypeId newTypeId(IASTDeclSpecifier declSpecifier,
IASTDeclarator declarator)
IASTTypeIdExpression newTypeIdExpression(int operator,
IASTTypeId typeId)
IASTTypeIdInitializerExpression newTypeIdInitializerExpression(IASTTypeId typeId,
IASTInitializer initializer)
IASTUnaryExpression newUnaryExpression(int operator,
IASTExpression operand)
IASTWhileStatement newWhileStatement(IASTExpression condition,
IASTStatement body)
void setEndOffset(IASTNode node,
IASTNode endNode)
node - a node created by this factoryendNode - a node created by this factory defining the end for the other node.
void setEndOffset(IASTNode node,
int endOffset)
IToken.getEndOffset() from a token provided by the scanner for
this translation unit.
node - a node created by this factoryendOffset - the end offset (exclusive) for the nodenewTranslationUnit(IScanner)
void setOffsets(IASTNode node,
int offset,
int endOffset)
IToken.getOffset() or IToken.getEndOffset() from tokens
provided by the scanner for this translation unit.
node - a node created by this factoryoffset - the offset (inclusive) for the nodeendOffset - the end offset (exclusive) for the nodenewTranslationUnit(IScanner)
|
Eclipse CDT 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||