Exemplo n.º 1
0
 public bool TryPrintReturnTypeOfSignature(
     ISignatureDeclaration signatureDeclaration,
     out string result,
     INode enclosingDeclaration = null,
     TypeFormatFlags flags      = TypeFormatFlags.None)
 {
     Contract.Requires(signatureDeclaration != null, "signatureDeclaration != null");
     throw new NotImplementedException();
 }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public bool TryPrintReturnTypeOfSignature(
            ISignatureDeclaration signatureDeclaration,
            out string result,
            INode enclosingDeclaration = null,
            TypeFormatFlags flags      = TypeFormatFlags.None)
        {
            Contract.Requires(signatureDeclaration != null, "signatureDeclaration != null");

            var signature = TypeChecker.GetSignatureFromDeclaration(signatureDeclaration);
            var type      = TypeChecker.GetReturnTypeOfSignature(signature);

            return(TryPrintType(type, out result, enclosingDeclaration, flags));
        }
Exemplo n.º 3
0
 public override void SetContainers(BlockStatement containingBlock, ISignatureDeclaration containingSignatureDeclaration)
 {
     base.SetContainers(containingBlock, containingSignatureDeclaration);
       this.SetContainingBlockForContracts();
 }
Exemplo n.º 4
0
 private void AnalyzeCallSignature(ISignatureDeclaration source)
 {
     AnalyzeTypeParameters(source.TypeParameters);
     AnalyzeParameters(source.Parameters);
     AnalyzeTypeReference(source.Type);
 }
Exemplo n.º 5
0
 public override void SetContainers(BlockStatement containingBlock, ISignatureDeclaration containingSignatureDeclaration)
 {
     base.SetContainers(containingBlock, containingSignatureDeclaration);
     this.SetContainingBlockForContracts();
 }
Exemplo n.º 6
0
 //^ ensures result == null || result is ITypeDefinition || result is INamespaceDefinition || result is ITypeGroup ||
 //^ (!restrictToNamespacesAndTypes && (result is IParameterDefinition || result is ITypeDefinitionMember || result is INamespaceMember));
 /// <summary>
 /// Returns either null or the local variable, parameter, type parameter, type member, namespace member or type
 /// that binds to this name using the scope chain of the given method.
 /// </summary>
 /// <param name="signatureDeclaration">The signature bearing object whose scope chain is used to resolve this name.</param>
 /// <param name="restrictToNamespacesAndTypes">True if only namespaces and types should be considered when resolving this name.</param>
 /*?*/
 protected override object ResolveUsing(ISignatureDeclaration signatureDeclaration, bool restrictToNamespacesAndTypes)
 {
     FunctionDeclaration/*?*/ functionDeclaration = signatureDeclaration as FunctionDeclaration;
       if (functionDeclaration != null && functionDeclaration.templateParameters != null) {
     foreach (GenericMethodParameterDeclaration templateParameter in functionDeclaration.templateParameters) {
       if (this.Name.UniqueKey == templateParameter.Name.UniqueKey)
     foreach (var tPar in functionDeclaration.ResolvedMethod.GenericParameters) {
       if (this.Name.UniqueKey == tPar.Name.UniqueKey) return tPar;
     }
     }
       }
       return base.ResolveUsing(signatureDeclaration, restrictToNamespacesAndTypes);
 }
Exemplo n.º 7
0
 //^ ensures result.GetType() == this.GetType();
 public override ParameterDeclaration MakeShallowCopyFor(ISignatureDeclaration containingSignature, BlockStatement containingBlock)
 {
     if (this.ContainingSignature == containingSignature) return this;
       return new VccParameterDeclaration(containingSignature, containingBlock, this);
 }
Exemplo n.º 8
0
 protected VccParameterDeclaration(ISignatureDeclaration containingSignature, BlockStatement containingBlock, VccParameterDeclaration template)
     : base(containingSignature, containingBlock, template)
 {
     this.specifiers = new List<Specifier>(template.specifiers);
       this.isSpec = template.isSpec;
 }