tran method

  1. @override
String tran(
  1. LanguageTip tip
)
override

transform to target code, the target information is in the tip

Implementation

@override
String tran(LanguageTip tip) {
  lines.addIndent();
  final format = tip.getRule('while');
  return sprintf(format, [
    condition.tran(tip),
    lines.tran(tip),
    ' ' * tip.indent,
  ]);
}