Boo.Lang.Compiler.Steps.ExpandDuckTypedExpressions.LeaveSlicingExpression C# (CSharp) Method

LeaveSlicingExpression() public method

public LeaveSlicingExpression ( Boo.Lang.Compiler.Ast.SlicingExpression node ) : void
node Boo.Lang.Compiler.Ast.SlicingExpression
return void
        public override void LeaveSlicingExpression(SlicingExpression node)
        {
            if (!IsDuckTyped(node.Target)) return;
            if (AstUtil.IsLhsOfAssignment(node)) return;

            // todo
            // a[foo]
            // RuntimeServices.GetSlice(a, "", (foo,))

            MethodInvocationExpression mie = CodeBuilder.CreateMethodInvocation(
                node.LexicalInfo,
                RuntimeServices_GetSlice,
                GetSlicingTarget(node),
                CodeBuilder.CreateStringLiteral(GetSlicingMemberName(node)),
                GetArrayForIndices(node));

            Replace(mie);
        }