PageRenderTime 8ms CodeModel.GetById 5ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/IronPython_Main/Tools/IronStudio/IronPythonToolsCore/PyAnalysis/Values/ListPopBoundBuiltinMethodInfo.cs

#
C# | 38 lines | 18 code | 4 blank | 16 comment | 0 complexity | da156ee2c22303000c347a685e7601f7 MD5 | raw file
 1/* ****************************************************************************
 2 *
 3 * Copyright (c) Microsoft Corporation. 
 4 *
 5 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
 6 * copy of the license can be found in the License.html file at the root of this distribution. If 
 7 * you cannot locate the Apache License, Version 2.0, please send an email to 
 8 * ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 9 * by the terms of the Apache License, Version 2.0.
10 *
11 * You must not remove this notice, or any other, from this software.
12 *
13 * ***************************************************************************/
14
15using System;
16using System.Collections.Generic;
17using System.Linq;
18using System.Text;
19using Microsoft.PyAnalysis.Interpreter;
20using IronPython.Compiler.Ast;
21
22namespace Microsoft.PyAnalysis.Values {
23    /// <summary>
24    /// Represents list.pop on a list with known type information.
25    /// </summary>
26    class ListPopBoundBuiltinMethodInfo : BoundBuiltinMethodInfo {
27        private readonly ListInfo _list;
28
29        public ListPopBoundBuiltinMethodInfo(ListInfo list, BuiltinMethodInfo method)
30            : base(method) {
31            _list = list;
32        }
33
34        public override ISet<Namespace> Call(Node node, AnalysisUnit unit, ISet<Namespace>[] args, string[] keywordArgNames) {            
35            return _list.UnionType;
36        }
37    }
38}