TryStatementImpl constructor
TryStatementImpl({
- required Token tryKeyword,
- required BlockImpl body,
- required List<
CatchClauseImpl> catchClauses, - required Token? finallyKeyword,
- required BlockImpl? finallyBlock,
Initialize a newly created try statement. The list of catchClauses
can
benull
if there are no catch clauses. The finallyKeyword and
finallyBlock
can be null
if there is no finally clause.
Implementation
TryStatementImpl({
required this.tryKeyword,
required BlockImpl body,
required List<CatchClauseImpl> catchClauses,
required this.finallyKeyword,
required BlockImpl? finallyBlock,
}) : _body = body,
_finallyBlock = finallyBlock {
_becomeParentOf(_body);
_catchClauses._initialize(this, catchClauses);
_becomeParentOf(_finallyBlock);
}