예제 #1
0
            object IConstantResolver.GetConstantIdentifier(string Name)
            {
                if (CurrentScope == null)
                {
                    return(null);
                }
                var Symbol = CurrentScope.FindSymbol(Name);

                if (Symbol == null)
                {
                    Console.Error.WriteLine("Can't find symbol {0}", Name);
                    return(null);
                }
                return(Symbol.ConstantValue);
            }
예제 #2
0
 CType IIdentifierTypeResolver.ResolveIdentifierType(string Identifier)
 {
     return(CurrentScope.FindSymbol(Identifier).CType);
 }