Package org.sonar.python.tree
Class WhileStatementImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.WhileStatementImpl
-
- All Implemented Interfaces:
Statement,Tree,WhileStatement
public class WhileStatementImpl extends PyTree implements WhileStatement
-
-
Constructor Summary
Constructors Constructor Description WhileStatementImpl(com.sonar.sslr.api.AstNode astNode, Token whileKeyword, Expression condition, Token colon, StatementList body, Token elseKeyword, Token elseColon, StatementList elseBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)StatementListbody()List<Tree>children()Tokencolon()Expressioncondition()StatementListelseBody()TokenelseColon()TokenelseKeyword()Tree.KindgetKind()TokenwhileKeyword()-
Methods inherited from class org.sonar.python.tree.PyTree
astNode, firstToken, is, lastToken, parent, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sonar.python.api.tree.Tree
ancestors, astNode, descendants, descendants, firstToken, is, lastToken, parent
-
-
-
-
Constructor Detail
-
WhileStatementImpl
public WhileStatementImpl(com.sonar.sslr.api.AstNode astNode, Token whileKeyword, Expression condition, Token colon, StatementList body, @Nullable Token elseKeyword, @Nullable Token elseColon, @Nullable StatementList elseBody)
-
-
Method Detail
-
accept
public void accept(TreeVisitor visitor)
-
whileKeyword
public Token whileKeyword()
- Specified by:
whileKeywordin interfaceWhileStatement
-
condition
public Expression condition()
- Specified by:
conditionin interfaceWhileStatement
-
colon
public Token colon()
- Specified by:
colonin interfaceWhileStatement
-
body
public StatementList body()
- Specified by:
bodyin interfaceWhileStatement
-
elseKeyword
@CheckForNull public Token elseKeyword()
- Specified by:
elseKeywordin interfaceWhileStatement
-
elseColon
@CheckForNull public Token elseColon()
- Specified by:
elseColonin interfaceWhileStatement
-
elseBody
@CheckForNull public StatementList elseBody()
- Specified by:
elseBodyin interfaceWhileStatement
-
-