public ForeachStatement(TypeReference typeReference, string variableName, Expression expression, Statement embeddedStatement) { this.typeReference = typeReference; this.variableName = variableName; this.expression = expression; this.embeddedStatement = embeddedStatement; }
ArrayList iterator; // list of StatmentExpressions #endregion Fields #region Constructors public ForStatement(ArrayList initializers, Expression condition, ArrayList iterator, Statement embeddedStatement) { this.initializers = initializers; this.condition = condition; this.iterator = iterator; this.embeddedStatement = embeddedStatement; }
void Expr( #line 1767 "cs.ATG" out Expression expr) { #line 1768 "cs.ATG" expr = null; Expression expr1 = null, expr2 = null; UnaryExpr( #line 1770 "cs.ATG" out expr); if (StartOf(5)) { ConditionalOrExpr( #line 1773 "cs.ATG" ref expr); if (la.kind == 11) { lexer.NextToken(); Expr( #line 1773 "cs.ATG" out expr1); Expect(9); Expr( #line 1773 "cs.ATG" out expr2); #line 1773 "cs.ATG" expr = new ConditionalExpression(expr, expr1, expr2); } } else if (StartOf(6)) { #line 1775 "cs.ATG" AssignmentOperatorType op; Expression val; AssignmentOperator( #line 1775 "cs.ATG" out op); Expr( #line 1775 "cs.ATG" out val); #line 1775 "cs.ATG" expr = new AssignmentExpression(expr, op, val); } else SynErr(128); }
public SwitchStatement(Expression switchExpression, ArrayList switchSections) { this.switchExpression = switchExpression; this.switchSections = switchSections; }
public CaseLabel(Expression label) { this.label = label; }
public DoWhileStatement(Expression condition, Statement embeddedStatement) { this.condition = condition; this.embeddedStatement = embeddedStatement; }
public InvocationExpression(Expression targetObject, ArrayList parameters) { this.targetObject = targetObject; this.parameters = parameters; }
public FieldReferenceExpression(Expression targetObject, string fieldName) { this.targetObject = targetObject; this.fieldName = fieldName; }
public ThrowStatement(Expression throwExpression) { this.throwExpression = throwExpression; }
public ParenthesizedExpression(Expression expression) { this.expression = expression; }
public StatementExpression(Expression expression) { this.expression = expression; }
public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right) { this.left = left; this.op = op; this.right = right; }
public PointerReferenceExpression(Expression expression, string identifier) { this.expression = expression; this.identifier = identifier; }
public StackAllocExpression(TypeReference type, Expression expression) { this.type = type; this.expression = expression; }
public ConditionalExpression(Expression testCondition, Expression trueExpression, Expression falseExpression) { this.testCondition = testCondition; this.trueExpression = trueExpression; this.falseExpression = falseExpression; }
bool IsEventHandlerCreation(Expression expr) { if (expr is ObjectCreateExpression) { ObjectCreateExpression oce = (ObjectCreateExpression) expr; if (oce.Parameters.Count == 1) { expr = (Expression)oce.Parameters[0]; string methodName = null; if (expr is IdentifierExpression) { methodName = ((IdentifierExpression)expr).Identifier; } else if (expr is FieldReferenceExpression) { methodName = ((FieldReferenceExpression)expr).FieldName; } if (methodName != null) { foreach (object o in this.currentType.Children) { if (o is MethodDeclaration && ((MethodDeclaration)o).Name == methodName) { return true; } } } } } return false; }
public IfElseStatement(Expression condition, Statement embeddedStatement, Statement embeddedElseStatement) { this.condition = condition; this.embeddedStatement = embeddedStatement; this.embeddedElseStatement = embeddedElseStatement; }
public GotoCaseStatement(Expression caseExpression) { this.caseExpression = caseExpression; }
public IndexerExpression(Expression targetObject, ArrayList indices) { this.targetObject = targetObject; this.indices = indices; }
public CheckedExpression(Expression expression) { this.expression = expression; }
public VariableDeclaration(string name, Expression initializer) { this.name = name; this.initializer = initializer; }
public LockStatement(Expression lockExpression, Statement embeddedStatement) { this.lockExpression = lockExpression; this.embeddedStatement = embeddedStatement; }
public YieldStatement(Expression yieldExpression) { this.yieldExpression = yieldExpression; }
public CastExpression(TypeReference castTo, Expression expression) { this.castTo = castTo; this.expression = expression; }
public BinaryOperatorExpression(Expression left, BinaryOperatorType op, Expression right) { this.left = left; this.op = op; this.right = right; }
public ReturnStatement(Expression returnExpression) { this.returnExpression = returnExpression; }
public CaseLabel() { this.label = null; }
public DirectionExpression(FieldDirection fieldDirection, Expression expression) { this.fieldDirection = fieldDirection; this.expression = expression; }
public SwitchStatement(Expression switchExpression) { this.switchExpression = switchExpression; }
void MultiplicativeExpr( #line 2012 "cs.ATG" ref Expression outExpr) { #line 2014 "cs.ATG" Expression expr; BinaryOperatorType op = BinaryOperatorType.None; while (la.kind == 6 || la.kind == 7 || la.kind == 8) { if (la.kind == 6) { lexer.NextToken(); #line 2020 "cs.ATG" op = BinaryOperatorType.Multiply; } else if (la.kind == 7) { lexer.NextToken(); #line 2021 "cs.ATG" op = BinaryOperatorType.Divide; } else { lexer.NextToken(); #line 2022 "cs.ATG" op = BinaryOperatorType.Modulus; } UnaryExpr( #line 2024 "cs.ATG" out expr); #line 2024 "cs.ATG" outExpr = new BinaryOperatorExpression(outExpr, op, expr); } }