Ejemplo n.º 1
0
 public ForStatement(HappySourceLocation span, Identifier loopVariable, ExpressionNodeBase enumerable, ExpressionNodeBase between, ExpressionNodeBase where, StatementBlock loopBody)
     : base(span, loopBody.Location)
 {
     _loopVariable = loopVariable;
     _enumerable = enumerable;
     _between = between;
     _where = where != null ? new ForWhereClause(where.Location, _loopVariable.Text, where) : null;
     _loopBody = loopBody;
 }
Ejemplo n.º 2
0
 public override void AfterVisit(ForWhereClause node)
 {
     var whereCondition = _expressionStack.Pop();
     _expressionStack.Push(node, RuntimeHelpers.EnsureBoolResult(whereCondition));
     base.AfterVisit(node);
 }
Ejemplo n.º 3
0
 public virtual void BeforeVisit(ForWhereClause node)
 {
     this.BeforeVisitCatchAll(node);
 }
Ejemplo n.º 4
0
 public virtual void AfterVisit(ForWhereClause node)
 {
     this.AfterVisitCatchAll(node);
 }
Ejemplo n.º 5
0
 public override void BeforeVisit(ForWhereClause node)
 {
     var whereSymbolTable = new HappySymbolTable("where(" + node.LoopVariableName + ")", this.TopSymbolTable);
     whereSymbolTable.Add(node.LoopVariableName);
     node.GetExtension<ScopeExtension>().SymbolTable = whereSymbolTable;
     _scopeStack.Push(whereSymbolTable);
     base.BeforeVisit(node);
 }
Ejemplo n.º 6
0
 public override void AfterVisit(ForWhereClause node)
 {
     _scopeStack.Pop();
     base.AfterVisit(node);
 }