1 16 19 20 package org.apache.xalan.xsltc.compiler; 21 22 import org.apache.xalan.xsltc.compiler.util.ClassGenerator; 23 import org.apache.xalan.xsltc.compiler.util.ErrorMsg; 24 import org.apache.xalan.xsltc.compiler.util.MethodGenerator; 25 import org.apache.xalan.xsltc.compiler.util.Type; 26 import org.apache.xalan.xsltc.compiler.util.TypeCheckError; 27 import org.apache.xalan.xsltc.compiler.util.Util; 28 29 33 final class Otherwise extends Instruction { 34 public void display(int indent) { 35 indent(indent); 36 Util.println("Otherwise"); 37 indent(indent + IndentIncrement); 38 displayContents(indent + IndentIncrement); 39 } 40 41 public Type typeCheck(SymbolTable stable) throws TypeCheckError { 42 typeCheckContents(stable); 43 return Type.Void; 44 } 45 46 public void translate(ClassGenerator classGen, MethodGenerator methodGen) { 47 final Parser parser = getParser(); 48 final ErrorMsg err = new ErrorMsg(ErrorMsg.STRAY_OTHERWISE_ERR, this); 49 parser.reportError(Constants.ERROR, err); 50 } 51 } 52 | Popular Tags |