CoCtrlStruct constructor

CoCtrlStruct(
  1. Stmt node, {
  2. num? counter,
  3. num? end,
  4. int? stmtIdx,
  5. Function? iter,
})

Constructor. Optional counter, end, and iter parameters for different types of control structures. For example, a for-loop would have a counter but a while loop would have a condition stored in node.

Implementation

CoCtrlStruct(this.node, {num? counter, num? end, int? stmtIdx, this.iter})
  : counter = counter ?? 0,
    end = end ?? 0,
    stmtIdx = stmtIdx ?? 0;