visitRepeatUntilLoopStmt method

  1. @override
GzBaseNode visitRepeatUntilLoopStmt(
  1. RepeatUntilLoopStmt repeatUntilLoopStmt
)
override

Implementation

@override
GzBaseNode visitRepeatUntilLoopStmt(RepeatUntilLoopStmt repeatUntilLoopStmt) {
  final body = repeatUntilLoopStmt.body.map((e) => e.accept(this)).toList();
  final expr = repeatUntilLoopStmt.untilExpr.accept(this);

  return node(
    'repeat',
    shape: 'diamond',
    color: 'yellow',
    children: [
      node('expr', color: pink, children: [expr]),
      node('until', color: 'yellow', children: body),
    ],
  );
}