コード例 #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="scope"></param>
        public NakoVariableManager(NakoVariableScope scope)
        {
            list  = new List <NakoVariable>();
            names = new Dictionary <string, int>();

            if (scope == NakoVariableScope.Global)
            {
                // 変数「それ」を登録
                NakoVariable sore = new NakoVariable();
                sore.SetBody(0, NakoVarType.Int);
                list.Add(sore);
                names[NakoReservedWord.SORE] = 0;
            }
        }
コード例 #2
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="scope"></param>
        public NakoVariableManager(NakoVariableScope scope)
        {
            list = new List<NakoVariable>();
            names = new Dictionary<string, int>();

            if (scope == NakoVariableScope.Global)
            {
                // 変数「それ」を登録
                NakoVariable sore = new NakoVariable();
                sore.SetBody(0, NakoVarType.Int);
                list.Add(sore);
                names[NakoReservedWord.SORE] = 0;
            }
        }