package dynamake.commands;

import java.io.Serializable;
import java.util.ArrayDeque;

public class ExecutionScope implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private ArrayDeque<Object> production = new ArrayDeque<Object>();
	
	public void produce(Object value) {
		production.addLast(value);
	}
	
	public Object consume() {
		return production.pollFirst();
	}

	public void unproduce() {
		production.removeLast();
	}

	public void unconsume(Object value) {
		production.addFirst(value);
	}
}

@@ -198,16 +198,60 @@
 ID = 1L;
+%0A%09%0A%09private static class NullWrapper %7B%0A%09%09%0A%09%7D
 %0A%0A%09priva
@@ -342,32 +342,85 @@
 Object value) %7B%0A
+%09%09if(value == null)%0A%09%09%09value = new NullWrapper();%0A%09%09%0A
 %09%09production.add
@@ -470,14 +470,23 @@
 %7B%0A%09%09
-return
+Object value = 
  pro
@@ -502,24 +502,78 @@
 ollFirst();%0A
+%09%09return value instanceof NullWrapper ? null : value;%0A
 %09%7D%0A%0A%09public 

Add support for producing/consuming Java nulls in a scope.