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; }
public override void AfterVisit(ForWhereClause node) { var whereCondition = _expressionStack.Pop(); _expressionStack.Push(node, RuntimeHelpers.EnsureBoolResult(whereCondition)); base.AfterVisit(node); }
public virtual void BeforeVisit(ForWhereClause node) { this.BeforeVisitCatchAll(node); }
public virtual void AfterVisit(ForWhereClause node) { this.AfterVisitCatchAll(node); }
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); }
public override void AfterVisit(ForWhereClause node) { _scopeStack.Pop(); base.AfterVisit(node); }