build method

  1. @override
String build(
  1. Context context,
  2. ParserResult? result
)
override

Implementation

@override
String build(Context context, ParserResult? result) {
  final fast = result == null;
  final values = context.allocateLocals(['left', 'op', 'pos', 'right']);
  final r1 = context.getResult(left, !fast);
  final r2 = context.getResult(operator, !fast);
  final r3 = context.getResult(right, !fast);
  values.addAll({
    'calculate': calculate.build(context, 'calculate', [
      left.getResultValue(values['left']!),
      values['op']!,
      values['right']!,
    ]),
    'O': left.getResultType(),
    'p1': left.build(context, r1),
    'p2': Silent(operator).build(context, r2),
    'p3': right.build(context, r3),
  });
  return render2(
      fast, _templateFast, _template, values, [result, r1, r2, r3]);
}