コード例 #1
0
        public override Expression Compile()
        {
            var left      = LeftNode[0].Accept(Compiler);
            var arguments = CompileArguments();

            Right = RightNode.Accept(Compiler);

            var argumentKinds = ArgumentsNode.Select(node => node.Token.Type.GetArgumentKind());
            var argumentVars  = CreateArgumentVariables();

            invocationArguments =
                argumentKinds.Zip(argumentVars, (kind, arg) => new InvocationArgument(kind, arg)).ToArray();

            var argumentVarsAssignment = ArgumentCount == 0
                ? (Expression)Empty()
                : Block(argumentVars.Zip(arguments, Assign));

            return(Block(
                       typeof(iObject),
                       new[] { instance }.Concat(argumentVars),
                       Assign(instance, left),
                       argumentVarsAssignment,
                       base.Compile()
                       ));
        }
コード例 #2
0
        public override Expression Compile()
        {
            var left  = LeftNode.Accept(Compiler);
            var right = RightNode.Accept(Compiler);

            var visibility = LeftNode.GetVisibility();
            var argument   = new InvocationArgument(ArgumentKind.Simple, right);

            return(CompilerUtils.Call(left, Operator, visibility, argument));
        }
コード例 #3
0
        public override Expression Compile()
        {
            var left = LeftNode[0].Accept(Compiler);

            Right = RightNode.Accept(Compiler);

            return(Block(
                       typeof(iObject),
                       new[] { instance },
                       Assign(instance, left),
                       base.Compile()
                       ));
        }
コード例 #4
0
 public override Expression Compile()
 {
     Right = RightNode.Accept(Compiler);
     return(base.Compile());
 }