001 package escjava.vcGeneration;
002
003 // TBoolOp = return a boolean and sons are boolean : list(boolean) -> boolean
004 public class TSelect extends TFunction {
005
006 public void typeTree(){
007
008 if(sons.size()!=2)
009 TDisplay.err(this, "typeTree()", "Node with "+sons.size()+" instead of 2, that's strange...");
010 else {
011 TNode n1 = getChildAt(0);
012 TNode n2 = getChildAt(1);
013
014 /*
015 * As the son #1 can be a reference of have a final type,
016 * we can't guess it here. We just know that the second son should
017 * be a %Reference.
018 */
019 n2.setType(_Reference,true);
020
021 n1.typeTree();
022 n2.typeTree();
023 }
024
025 }
026
027 public void accept(/*@ non_null @*/ TVisitor v) throws java.io.IOException{
028 v.visitTSelect(this);
029 }
030
031 }
032
033 // fixme
034 // %Field * %Reference * ? (value, %Reference?) -> memory