/** * Add a record to the current trace corresponding to the start of the evaluation of the given * node. If the trace is null, then do nothing. */ protected void _traceEnter(ASTPtRootNode node) { if (_trace != null) { for (int i = 0; i < _depth; i++) { _trace.append(" "); } _trace.append("Entering node " + node.getClass().getName() + "\n"); _depth++; } }
/** * Add a record to the current trace corresponding to the completion of the evaluation of the * given node. If the trace is null, then do nothing. */ protected void _traceLeave(ASTPtRootNode node) { if (_trace != null) { _depth--; for (int i = 0; i < _depth; i++) { _trace.append(" "); } _trace.append( "Node " + node.getClass().getName() + " evaluated to " + _evaluatedChildToken + "\n"); } }