예제 #1
0
        public void CreateAliasTypeInfo()
        {
            var result = new AliasTypeInfo("TokenType", TypeInfo.Int);

            Assert.AreEqual("TokenType", result.Name);
            Assert.AreSame(TypeInfo.Int, result.TypeInfo);
        }
예제 #2
0
파일: Scope.cs 프로젝트: frankcs/tiger
        /// <summary>
        /// Defines an alias for a type.
        /// </summary>
        /// <param name="alias">The alias to define.</param>
        /// <param name="typeName">The name of the type to create an alias for.</param>
        /// <returns></returns>
        public void DefineAlias(string alias, string typeName)
        {
            var alInfo = new AliasTypeInfo(typeName);

            TypeTable.Add(alias, alInfo);
        }