コード例 #1
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Removes the provided name from this scope removing names
 /// visible to both the current context and all contexts.
 /// </summary>
 public void RemoveNameForContext(LanguageContext context, SymbolId name)
 {
     if (!TryRemoveForContext(context, name))
     {
         throw context.MissingName(name);
     }
 }
コード例 #2
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Removes the provided name from this scope removing names
 /// visible to both the current context and all contexts.
 /// </summary>
 public bool RemoveName(LanguageContext context, SymbolId name)
 {
     if (!TryRemoveName(context, name))
     {
         throw context.MissingName(name);
     }
     return(true);
 }
コード例 #3
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
        /// <summary>
        /// Attempts to lookup the provided name in this scope or any outer scope.  The
        /// search includes looking for names that are only visible to the provided LanguageContext.
        ///
        /// If the name is not defined the language defined MissingName exception is thrown.
        /// </summary>
        public object LookupName(LanguageContext context, SymbolId name)
        {
            object res;

            if (!TryLookupName(context, name, out res))
            {
                throw context.MissingName(name);
            }

            return(res);
        }
コード例 #4
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Removes the provided name from this scope removing names
 /// visible to both the current context and all contexts.
 /// </summary>
 public void RemoveNameForContext(LanguageContext context, SymbolId name) {
     if (!TryRemoveForContext(context, name)) {
         throw context.MissingName(name);
     }
 }
コード例 #5
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Removes the provided name from this scope removing names
 /// visible to both the current context and all contexts.
 /// </summary>
 public bool RemoveName(LanguageContext context, SymbolId name) {
     if (!TryRemoveName(context, name)) {
         throw context.MissingName(name);
     }
     return true;
 }
コード例 #6
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
        /// <summary>
        /// Attempts to lookup the provided name in this scope or any outer scope.  The
        /// search includes looking for names that are only visible to the provided LanguageContext.
        /// 
        /// If the name is not defined the language defined MissingName exception is thrown.
        /// </summary>
        public object LookupName(LanguageContext context, SymbolId name) {
            object res;
            if (!TryLookupName(context, name, out res)) {
                throw context.MissingName(name);
            }

            return res;
        }