1 33 34 35 package bsh; 36 37 public class BSHPackageDeclaration extends SimpleNode 38 { 39 40 public BSHPackageDeclaration(int id) { 41 super(id); 42 } 43 44 public Object eval( CallStack callstack, Interpreter interpreter ) 45 throws EvalError 46 { 47 BSHAmbiguousName name = (BSHAmbiguousName)jjtGetChild(0); 48 NameSpace namespace = callstack.top(); 49 namespace.setPackage( name.text ); 50 namespace.importPackage( name.text ); 52 return Primitive.VOID; 53 } 54 } 55 | Popular Tags |