enterDef method
The default implementation does nothing.
Implementation
@override
void enterDef(DefContext ctx) {
final type = ctx.idType()!.text;
final node = TypeNode(ctx.dataType()!);
final first = node.children.first;
if (first.ctx is IdTypeContext) {
final id = first.ctx.text;
_sb.writeln(
'/// [$type] defined in Candid: '
'${ctx.text}\ntypedef $type = ${kPrimitiveTypeDartMap[id] ?? id};',
);
return;
}
_eachNode(node, type);
}