Exemple #1
0
 // Lookup a system type
 // Context-free
 public TypeEntry LookupSystemType(string st)
 {        
     NamespaceEntry nsSystem = (NamespaceEntry) LookupSymbol(m_scopeGlobal, "System", true);
     Scope scopeSystem = nsSystem.ChildScope;
     
     
     SymEntry s = LookupSymbol(scopeSystem, st, true);        
     
     // An end-user program can't lookup system types, so this assert should be fine.        
     Debug.Assert(s is TypeEntry, "Expected '" + st + "' is a type");
     
     return s as TypeEntry;
 }
Exemple #2
0
 //-----------------------------------------------------------------------------
 // The symbol is undefined in the namespace.
 //-----------------------------------------------------------------------------
 public static SymbolErrorException UndefinedSymbolInNamespace(
     NamespaceEntry n,
     Identifier idMissingSymbol
     )
 {
     return new SymbolErrorException(
         Code.cSymbolNotInNamespace,
         idMissingSymbol.Location,
         "'" + idMissingSymbol.Text + "' is not defined in the namespace '" + 
         n.FullName + "'. (Are you missing an assembly reference?)");
 }