Esempio n. 1
0
        private bool TryFindTypeCore(string name, out NativeType type, out bool loadedFromNextLookup)
        {
            if (_storage.TryGetType(name, out type))
            {
                loadedFromNextLookup = false;
                return(true);
            }

            if (_nextSymbolLookup.TryGetType(name, out type))
            {
                loadedFromNextLookup = true;
                return(true);
            }

            NativeBuiltinType bt = null;

            if (NativeBuiltinType.TryConvertToBuiltinType(name, out bt))
            {
                loadedFromNextLookup = false;
                type = bt;
                return(true);
            }

            loadedFromNextLookup = false;
            return(false);
        }
Esempio n. 2
0
 public void EnsureTypeKeywordToBuiltin()
 {
     foreach (TokenType cur in EnumUtil.GetAllValues <TokenType>())
     {
         if (TokenHelper.IsTypeKeyword(cur))
         {
             NativeBuiltinType bt = null;
             Assert.True(NativeBuiltinType.TryConvertToBuiltinType(cur, out bt));
         }
     }
 }