1 30 package com.genimen.djeneric.tools.scriptengine.core.nodes; 31 32 import com.genimen.djeneric.tools.scriptengine.core.DjScriptParserEngine; 33 import com.genimen.djeneric.tools.scriptengine.core.SimpleNode; 34 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptExecutionException; 35 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptExecutionTimeScope; 36 37 public class BodyNode extends SimpleNode 38 { 39 40 public BodyNode(int i) 41 { 42 super(i); 43 } 44 45 public BodyNode(DjScriptParserEngine p, int i) 46 { 47 super(p, i); 48 } 49 50 public String getName() 51 { 52 return "body"; 53 } 54 55 public String toString() 56 { 57 return "body"; 58 } 59 60 public void execute(DjScriptExecutionTimeScope context) throws DjScriptExecutionException 61 { 62 context.mark(); 63 64 executeButKeepStack(context); 65 66 context.releaseToMark(); 67 } 68 69 public void executeButKeepStack(DjScriptExecutionTimeScope context) throws DjScriptExecutionException 70 { 71 for (int i = 0; i < getChildCount(); i++) 72 { 73 getChild(i).execute(context); 74 } 75 } 76 77 } | Popular Tags |