public EvaluationResult evaluate( EvaluationContext context )
throws EvaluationException
{
final EvaluationResult _result;
Message _event = context.getCurrentMessage();
AbstractTCLNode _left = left();
if (_left == null) {
// this is the case when the expression just consists of
// '$'. $ denotes the current Message.
return EvaluationResult.fromAny( _event.toAny() );
}
switch (_left.getType()) {
case TCLParserTokenTypes.RUNTIME_VAR:
RuntimeVariableNode _var = ( RuntimeVariableNode ) _left;
_result = _event.extractValue( context,
this,
_var );
break;
case TCLParserTokenTypes.DOT:
// fallthrough
case TCLParserTokenTypes.ASSOC:
_result = _event.extractValue(context,
this );
break;
default:
// coming here means, we've hit a bug