1 package com.genimen.djeneric.tools.generator.core.nodes; 2 3 import com.genimen.djeneric.tools.generator.core.DjentelParserEngine; 4 import com.genimen.djeneric.tools.generator.core.ParseException; 5 import com.genimen.djeneric.tools.generator.core.SimpleNode; 6 import com.genimen.djeneric.tools.generator.core.util.ParseContext; 7 8 public class BodyNode extends SimpleNode 9 { 10 11 public BodyNode(int i) 12 { 13 super(i); 14 } 15 16 public BodyNode(DjentelParserEngine p, int i) 17 { 18 super(p, i); 19 } 20 21 public String getName() 22 { 23 return "body"; 24 } 25 26 public String toString() 27 { 28 return ""; 29 } 30 31 public String evaluate(ParseContext context) throws ParseException 32 { 33 context.mark(); 34 StringBuffer result = new StringBuffer (2000); 35 for (int i = 0; i < getChildCount(); i++) 36 { 37 result.append(getChild(i).evaluate(context)); 38 } 39 40 context.releaseToMark(); 41 return result.toString(); 42 } 43 44 } 45 | Popular Tags |