IfStatementImpl constructor
IfStatementImpl({
- required Token ifKeyword,
- required Token leftParenthesis,
- required ExpressionImpl condition,
- required CaseClauseImpl? caseClause,
- required Token rightParenthesis,
- required StatementImpl thenStatement,
- required Token? elseKeyword,
- required StatementImpl? elseStatement,
Initialize a newly created if statement. The elseKeyword and
elseStatement
can be null
if there is no else clause.
Implementation
IfStatementImpl({
required this.ifKeyword,
required this.leftParenthesis,
required ExpressionImpl condition,
required this.caseClause,
required this.rightParenthesis,
required StatementImpl thenStatement,
required this.elseKeyword,
required StatementImpl? elseStatement,
}) : _condition = condition,
_thenStatement = thenStatement,
_elseStatement = elseStatement {
_becomeParentOf(_condition);
_becomeParentOf(caseClause);
_becomeParentOf(_thenStatement);
_becomeParentOf(_elseStatement);
}