/// <summary>Initializes a new instance of the <see cref="CaseStatement"/> class.</summary>
 /// <param name="context">The current <see cref="T:ParserContext"/>.</param>
 /// <param name="value">The value to compare with the value of the switch-statement.</param>
 /// <param name="body">The statements that are executed when the case-value matches the switch-value.</param>
 internal CaseStatement(ParserContext context, Expression value, StatementCollection body)
     : base(context)
 {
     this.value = value;
     this.body  = body;
 }
Exemple #2
0
 /// <summary>Initializes a new instance of the <see cref="LoopStatement"/> class.</summary>
 /// <param name="context">The current <see cref="T:ParserContext"/>.</param>
 /// <param name="body">The body of the loop.</param>
 protected LoopStatement(ParserContext context, StatementCollection body)
     : base(context)
 {
     this.body = body;
 }
Exemple #3
0
 /// <summary>Initializes a new instance of the <see cref="ForLoopStatement"/> class.</summary>
 /// <param name="context">The current <see cref="T:ParserContext"/>.</param>
 /// <param name="variable">The variable that contains the loop value.</param>
 /// <param name="startExpression">The start-expression.</param>
 /// <param name="endExpression">The end-expression.</param>
 /// <param name="stepExpression">The step-expression.</param>
 /// <param name="body">The body of the loop.</param>
 internal ForLoopStatement(ParserContext context, Variable variable, Expression startExpression, Expression endExpression, Expression stepExpression, StatementCollection body)
     : base(context, body)
 {
     this.variable        = variable;
     this.startExpression = startExpression;
     this.endExpression   = endExpression;
     this.stepExpression  = stepExpression;
 }
 /// <summary>Initializes a new instance of the <see cref="SwitchStatement"/> class.</summary>
 /// <param name="context">The current <see cref="T:ParserContext"/>.</param>
 /// <param name="value">The value to compare with the case values.</param>
 /// <param name="cases">The case-statements to compare with the value.</param>
 /// <param name="elseBody">The statements that are executed when none of the cases match.</param>
 internal SwitchStatement(ParserContext context, Expression value, IEnumerable <CaseStatement> cases, StatementCollection elseBody)
     : base(context)
 {
     this.value    = value;
     this.cases    = cases;
     this.elseBody = elseBody;
 }
Exemple #5
0
 /// <summary>Initializes a new instance of the <see cref="IfStatement"/> class.</summary>
 /// <param name="context">The current <see cref="T:ParserContext"/>.</param>
 /// <param name="condition">The condition to evaluate.</param>
 /// <param name="trueStatements">The statements that are executed when the condition evaluates to true.</param>
 /// <param name="falseStatements">The statements that are executed when the condition evaluates to false.</param>
 internal IfStatement(ParserContext context, Expression condition, StatementCollection trueStatements, StatementCollection falseStatements)
     : base(context)
 {
     this.condition       = condition;
     this.trueStatements  = trueStatements;
     this.falseStatements = falseStatements;
 }
Exemple #6
0
 /// <summary>Initializes a new instance of the <see cref="RepeatLoopStatement"/> class.</summary>
 /// <param name="context">The current <see cref="T:ParserContext"/>.</param>
 /// <param name="condition">The condition of the loop.</param>
 /// <param name="body">The body of the loop.</param>
 internal RepeatLoopStatement(ParserContext context, Expression condition, StatementCollection body)
     : base(context, body)
 {
     this.condition = condition;
 }