コード例 #1
0
 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));
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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));
 }