public SwitchStatement(Location location, Expr value, ArrayList <Expr[]> caseList, ArrayList <BlockStatement> blockList, Statement defaultBlock, string label) { super(location); _value = value; _cases = new Expr[caseList.size()][]; caseList.toArray(_cases); _blocks = new BlockStatement[blockList.size()]; blockList.toArray(_blocks); _defaultBlock = defaultBlock; for (int i = 0; i < _blocks.length; i++) { _blocks[i].setParent(this); } if (_defaultBlock != null) { _defaultBlock.setParent(this); } _label = label; }
public TryStatement(Location location, Statement block) { super(location); _block = block; block.setParent(this); }
public WhileStatement(Location location, Expr test, Statement block, string label) { super(location); _test = test; _block = block; _label = label; block.setParent(this); }
public ForStatement(Location location, Expr init, Expr test, Expr incr, Statement block, string label) { super(location); _init = init; _test = test; _incr = incr; _block = block; _label = label; block.setParent(this); }
public ForeachStatement(Location location, Expr objExpr, AbstractVarExpr key, AbstractVarExpr value, bool isRef, Statement block, string label) { super(location); _objExpr = objExpr; _key = key; _value = value; _isRef = isRef; _block = block; _label = label; block.setParent(this); }
public IfStatement(Location location, Expr test, Statement trueBlock, Statement falseBlock) { super(location); _test = test; _trueBlock = trueBlock; _falseBlock = falseBlock; if (_trueBlock != null) { _trueBlock.setParent(this); } if (_falseBlock != null) { _falseBlock.setParent(this); } }
public void addCatch(StringValue id, AbstractVarExpr lhs, Statement block) { _catchList.add(new Catch(id, lhs, block)); block.setParent(this); }