コード例 #1
0
ファイル: FunctionNode.cs プロジェクト: TagsRocks/XzaarScript
        // try and find an appropriate return type by looking for a return instruction. if one cannot be found then we will return void
        public XzaarType GetReturnType(XzaarTypeFinderContext typeFinderContext)
        {
            if ((object)this.returnType != null)
            {
                return(returnType);
            }
            var typeFinder = new TypeFinderVisitor(typeFinderContext);

            returnType = FindReturnType(Body, typeFinder) ?? (XzaarType)typeof(void);
            return(returnType);
        }
コード例 #2
0
 public TypeFinderVisitor(XzaarTypeFinderContext context)
 {
     this.context = context;
 }