Exemple #1
0
        //------------------------------------------------------------
        // コンストラクタ。
        public FunctionSymbolNode(
            TypeSymbolNode aParent
            , ModuleContext aModuleContext
            , MemberFunctionDecl aFunctionDecl
            )
        {
            mParent        = aParent;
            mModuleContext = aModuleContext;
            mFunctionDecl  = aFunctionDecl;

            // TypeInfo生成
            {// 戻り値
                FunctionReturnValueDecl retValDecl = aFunctionDecl.ReturnValueDecl;
                mReturnTypeInfo = createTypeInfo(
                    retValDecl.TypePath
                    , retValDecl.IsConst
                    , false // isIn
                    , retValDecl.IsRef
                    );
            }
            {// 引数
                mArgTypeInfos = new List <ArgTypeInfo>();
                foreach (FunctionArgumentDecl argDecl in aFunctionDecl.ArgDeclList)
                {
                    mArgTypeInfos.Add(new ArgTypeInfo(argDecl.Ident, createTypeInfo(
                                                          argDecl.TypePath
                                                          , argDecl.IsConst
                                                          , argDecl.IsIn
                                                          , argDecl.IsRef
                                                          )));
                }
            }
        }
Exemple #2
0
 //------------------------------------------------------------
 // コンストラクタ。
 public MemberFunctionDecl(
     Identifier aIdent
     , FunctionReturnValueDecl aReturnValueDecl
     , FunctionArgumentDeclList aArgDeclList
     , BlockStatement aStatement
     , bool aIsAbstract
     , bool aIsConst
     , bool aIsOverride
     , bool aIsStatic
     )
 {
     Ident           = aIdent;
     ReturnValueDecl = aReturnValueDecl;
     ArgDeclList     = aArgDeclList;
     mStatement      = aStatement;
     mIsAbstract     = aIsAbstract;
     mIsConst        = aIsConst;
     mIsOverride     = aIsOverride;
     mIsStatic       = aIsStatic;
 }