1 16 19 20 package org.apache.xalan.xsltc.compiler; 21 22 import org.apache.bcel.generic.InstructionList; 23 import org.apache.xalan.xsltc.compiler.util.ClassGenerator; 24 import org.apache.xalan.xsltc.compiler.util.ErrorMsg; 25 import org.apache.xalan.xsltc.compiler.util.MethodGenerator; 26 import org.apache.xalan.xsltc.compiler.util.Type; 27 import org.apache.xalan.xsltc.compiler.util.TypeCheckError; 28 import org.apache.xalan.xsltc.compiler.util.Util; 29 30 class TopLevelElement extends SyntaxTreeNode { 31 32 35 public Type typeCheck(SymbolTable stable) throws TypeCheckError { 36 return typeCheckContents(stable); 37 } 38 39 42 public void translate(ClassGenerator classGen, MethodGenerator methodGen) { 43 ErrorMsg msg = new ErrorMsg(ErrorMsg.NOT_IMPLEMENTED_ERR, 44 getClass(), this); 45 getParser().reportError(FATAL, msg); 46 } 47 48 52 public InstructionList compile(ClassGenerator classGen, 53 MethodGenerator methodGen) { 54 final InstructionList result, save = methodGen.getInstructionList(); 55 methodGen.setInstructionList(result = new InstructionList()); 56 translate(classGen, methodGen); 57 methodGen.setInstructionList(save); 58 return result; 59 } 60 61 public void display(int indent) { 62 indent(indent); 63 Util.println("TopLevelElement"); 64 displayContents(indent + IndentIncrement); 65 } 66 } 67 | Popular Tags |