build method

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

Implementation

@override
String build(Context context, ParserResult? result) {
  context.refersToStateSource = true;
  final fast = result == null;
  final values = context.allocateLocals(['c', 'list', 'pos', 'start', 'str']);
  final size = controlChar > 0xffff ? 2 : 1;
  final r1 = context.getResult(escape, !fast);
  values.addAll({
    'controlChar': '$controlChar',
    'p1': escape.build(context, r1),
    'size': '$size',
    'test': normalChar.build(context, 'test', [values['c']!]),
  });
  return render2(fast, _templateFast, _template, values, [result, r1]);
}