visitForIterLoopStmt method
Implementation
@override
GzBaseNode visitForIterLoopStmt(ForIterLoopStmt forIterLoopStmt) {
final key = forIterLoopStmt.key.lexeme;
final val = forIterLoopStmt.value.lexeme;
final iter = forIterLoopStmt.iterExpr.accept(this);
final body = forIterLoopStmt.body.map((e) => e.accept(this)).toList();
return node(
'for',
color: 'yellow',
shape: 'diamond',
children: [
node(
'key',
color: pink,
children: [node(key, color: skyBlue)],
),
node(
'val',
color: pink,
children: [node(val, color: muave)],
),
node('in', color: pink, children: [iter]),
node('do', color: 'yellow', children: body),
],
);
}