createInnerEvaluator method

Evaluator createInnerEvaluator()

Creates a new Evaluator instance with a cloned Environment context and the same Buffer. This allows creating a nested Evaluator instance with its own context, while sharing the same output buffer.

Implementation

Evaluator createInnerEvaluator() {
  final innerContext = context.clone();
  return Evaluator.withBuffer(innerContext, buffer);
}