Interface Tree
-
- All Known Subinterfaces:
AliasedName,AnnotatedAssignment,AnyParameter,ArgList,Argument,AssertStatement,AssignmentExpression,AssignmentStatement,AwaitExpression,BinaryExpression,BreakStatement,CallExpression,ClassDef,CompoundAssignmentStatement,ComprehensionClause,ComprehensionExpression,ComprehensionFor,ComprehensionIf,ConditionalExpression,ContinueStatement,Decorator,DelStatement,DictCompExpression,DictionaryLiteral,DictionaryLiteralElement,DottedName,EllipsisExpression,ElseClause,ExceptClause,ExecStatement,Expression,ExpressionList,ExpressionStatement,FileInput,FinallyClause,FormattedExpression,ForStatement,FunctionDef,FunctionLike,GlobalStatement,IfStatement,ImportFrom,ImportName,ImportStatement,InExpression,IsExpression,KeyValuePair,LambdaExpression,ListLiteral,Name,NoneExpression,NonlocalStatement,NumericLiteral,Parameter,ParameterList,ParenthesizedExpression,PassStatement,PrintStatement,QualifiedExpression,RaiseStatement,RegularArgument,ReprExpression,ReturnStatement,SetLiteral,SliceExpression,SliceItem,SliceList,Statement,StatementList,StringElement,StringLiteral,SubscriptionExpression,Token,TryStatement,Tuple,TupleParameter,TypeAnnotation,UnaryExpression,UnpackingExpression,WhileStatement,WithItem,WithStatement,YieldExpression,YieldStatement
- All Known Implementing Classes:
AliasedNameImpl,AnnotatedAssignmentImpl,ArgListImpl,AssertStatementImpl,AssignmentExpressionImpl,AssignmentStatementImpl,AwaitExpressionImpl,BinaryExpressionImpl,BreakStatementImpl,CallExpressionImpl,ClassDefImpl,CompoundAssignmentStatementImpl,ComprehensionExpressionImpl,ComprehensionForImpl,ComprehensionIfImpl,ConditionalExpressionImpl,ContinueStatementImpl,DecoratorImpl,DelStatementImpl,DictCompExpressionImpl,DictionaryLiteralImpl,DictOrSetLiteralImpl,DottedNameImpl,EllipsisExpressionImpl,ElseClauseImpl,ExceptClauseImpl,ExecStatementImpl,ExpressionListImpl,ExpressionStatementImpl,FileInputImpl,FinallyClauseImpl,FormattedExpressionImpl,ForStatementImpl,FunctionDefImpl,GlobalStatementImpl,IfStatementImpl,ImportFromImpl,ImportNameImpl,InExpressionImpl,IsExpressionImpl,KeyValuePairImpl,LambdaExpressionImpl,ListLiteralImpl,NameImpl,NoneExpressionImpl,NonlocalStatementImpl,NumericLiteralImpl,ParameterImpl,ParameterListImpl,ParenthesizedExpressionImpl,PassStatementImpl,PrintStatementImpl,PyTree,QualifiedExpressionImpl,RaiseStatementImpl,RegularArgumentImpl,ReprExpressionImpl,ReturnStatementImpl,SetLiteralImpl,SimpleStatement,SliceExpressionImpl,SliceItemImpl,SliceListImpl,StatementListImpl,StringElementImpl,StringLiteralImpl,SubscriptionExpressionImpl,TokenImpl,TryStatementImpl,TupleImpl,TupleParameterImpl,TypeAnnotationImpl,UnaryExpressionImpl,UnpackingExpressionImpl,WhileStatementImpl,WithStatementImpl,WithStatementImpl.WithItemImpl,YieldExpressionImpl,YieldStatementImpl
public interface Tree
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTree.Kind
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)List<Tree>children()TokenfirstToken()Tree.KindgetKind()booleanis(Tree.Kind... kinds)TokenlastToken()Treeparent()
-
-
-
Method Detail
-
accept
void accept(TreeVisitor visitor)
-
is
boolean is(Tree.Kind... kinds)
-
firstToken
Token firstToken()
-
lastToken
Token lastToken()
- Returns:
- the last meaningful token of the Tree. Separators of simple statements (semicolon and/or newline) are not be returned by this method.
-
parent
Tree parent()
-
getKind
Tree.Kind getKind()
-
-