internal static CMD Gather(InterpreterState state, string key, Builder bld) { ExecutionSupport.Emit(() => string.Format("Command created: {0}, Source Position {1}", key, state.Source().SourcePosition)); state.Source().Advance(); ActionCommand<PropertyBasedExecutionEnvironment> cmd = new ActionCommand<PropertyBasedExecutionEnvironment>(bld.Action, key); if (bld.Expression != null) { MatchAnalyzer a = bld.Examine(state, key); Action<WARPObject> pushIfNonEmpty = o => { if (o != null && !String.IsNullOrEmpty(o.AsString())) cmd.ExecutionContext.Enqueue(o); }; pushIfNonEmpty(a.RealizedObject); pushIfNonEmpty(new WARPObject(a.PropertyName)); ExecutionSupport.Emit(() => string.Concat("Command input parsed: ", a.Source)); } return cmd; }