private Expression InlineToDo(Compiler.SemanticNodes.KeywordArgumentNode stop, Compiler.SemanticNodes.BlockNode block) { /// to: stop do: aBlock /// Inlines to: /// self to: stop by: 1 do: aBlock return(this.InlineToByDo(this.Receiver, stop.Accept(this), Expression.Constant(1, typeof(int)), block)); }
public override Expression VisitKeywordArgument(Compiler.SemanticNodes.KeywordArgumentNode node) { PrimaryVisitor visitor = new PrimaryVisitor(this); Expression result = node.Primary.Accept(visitor); if (node.Messages != null) { result = node.Messages.Accept(new MessageVisitor(this, result, visitor.IsSuperSend, visitor.IsConstant, false)); } else if (visitor.IsSuperSend) { throw (new SemanticCodeGenerationException(CodeGenerationErrors.SuperNotFollowedByMessage)).SetErrorLocation(node); } return(result); }
private Expression InlineToByDo(Compiler.SemanticNodes.KeywordArgumentNode stop, Compiler.SemanticNodes.KeywordArgumentNode by, Compiler.SemanticNodes.BlockNode block) { return(this.InlineToByDo(this.Receiver, stop.Accept(this), by.Accept(this), block)); }