IfExpr constructor

IfExpr(
  1. ASTNode condition,
  2. ASTNode thenBranch, {
  3. ASTNode? elseBranch,
  4. HTSource? source,
  5. int line = 0,
  6. int column = 0,
  7. int offset = 0,
  8. int length = 0,
})

Implementation

IfExpr(
  this.condition,
  this.thenBranch, {
  this.elseBranch,
  super.source,
  super.line = 0,
  super.column = 0,
  super.offset = 0,
  super.length = 0,
}) : super(
        InternalIdentifier.ifExpression,
        isAwait: condition.isAwait ||
            thenBranch.isAwait ||
            (elseBranch?.isAwait ?? false),
        isBlock: thenBranch.isBlock,
      );