コード例 #1
0
 public void Add(SymbolId name, object value)
 {
     throw new NotImplementedException();
 }
コード例 #2
0
 /// <summary>
 /// Attempts to remove the name from the provided scope using the current language's semantics.
 /// </summary>
 public virtual bool RemoveName(CodeContext context, SymbolId name)
 {
     return(context.Scope.RemoveName(this, name));
 }
コード例 #3
0
ファイル: LanguageContext.cs プロジェクト: clorton/IDM-CMS
 /// <summary>
 /// Called when a lookup has failed and an exception should be thrown.  Enables the
 /// language context to throw the appropriate exception for their language when
 /// name lookup fails.
 /// </summary>
 protected internal virtual Exception MissingName(SymbolId name)
 {
     return(new MissingMemberException(String.Format(CultureInfo.CurrentCulture, Resources.NameNotDefined, SymbolTable.IdToString(name))));
 }
コード例 #4
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
        /// <summary>
        /// Determines if this context or any outer scope contains the defined name that
        /// is available from the provided LanguageContext.
        /// </summary>
        public bool ContainsName(LanguageContext context, SymbolId name)
        {
            object tmp;

            return(TryLookupName(context, name, out tmp));
        }
コード例 #5
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Attemps to remove the provided name from this scope
 /// </summary>
 public bool TryRemoveName(SymbolId name)
 {
     return(TryRemoveName(InvariantContext.Instance, name));
 }
コード例 #6
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Attempts to lookup the provided name in this scope or any outer scope.
 /// </summary>
 public bool TryLookupName(SymbolId name, out object value)
 {
     return(TryLookupName(InvariantContext.Instance, name, out value));
 }
コード例 #7
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
        /// <summary>
        /// Sets the name to the specified value for the current context.
        /// </summary>
        /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception>
        public void SetName(SymbolId name, object value)
        {
            //if (_attrs != null) _attrs.CheckWritable(name);

            _dict[name] = value;
        }
コード例 #8
0
 protected internal override bool TryGetExtraValue(SymbolId key, out object value)
 {
     value = null;
     return(false);
 }
コード例 #9
0
 /// <summary>
 /// Trys to lookup the provided name in the current scope's context specific dictionary.
 /// Search includes names that are only visible to the provided LanguageContext.
 /// </summary>
 public bool TryGetNameForContext(LanguageContext context, SymbolId name, out object value)
 {
     value = null;
     return(false);
 }
コード例 #10
0
ファイル: SymbolDictionary.cs プロジェクト: clorton/IDM-CMS
 public bool TryGetValue(SymbolId key, out object value)
 {
     lock (this) return(_data.TryGetValue(key, out value));
 }
コード例 #11
0
 protected internal override bool TrySetExtraValue(SymbolId key, object value)
 {
     return(false);
 }
コード例 #12
0
ファイル: SymbolDictionary.cs プロジェクト: clorton/IDM-CMS
 public bool Remove(SymbolId key)
 {
     lock (this) return(_data.Remove(key));
 }
コード例 #13
0
ファイル: SymbolDictionary.cs プロジェクト: clorton/IDM-CMS
 public bool ContainsKey(SymbolId key)
 {
     lock (this) return(_data.ContainsKey(key));
 }
コード例 #14
0
ファイル: SymbolDictionary.cs プロジェクト: clorton/IDM-CMS
 public void Add(SymbolId key, object value)
 {
     lock (this) _data.Add(key, value);
 }
コード例 #15
0
 public bool Remove(SymbolId name)
 {
     throw new NotImplementedException();
 }
コード例 #16
0
 /// <summary>
 /// Sets the name to the specified value for the current context.
 ///
 /// Provides the ScopeMemberAttributes which should be set on the provided object.
 /// </summary>
 /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception>
 public void SetName(SymbolId name, object value, ScopeMemberAttributes attributes)
 {
     _dict[name] = value;
 }
コード例 #17
0
 public bool ContainsKey(SymbolId name)
 {
     throw new NotImplementedException();
 }
コード例 #18
0
 /// <summary>
 /// Called from generated code, helper to do name lookup
 /// </summary>
 public static object LookupName(CodeContext context, SymbolId name)
 {
     return(context.Scope.LookupName(context.LanguageContext, name));
 }
コード例 #19
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Attempts to lookup the provided name in this scope or any outer scope.   If the
 /// name is not defined MissingMemberException is thrown.
 /// </summary>
 public object LookupName(SymbolId name)
 {
     return(LookupName(InvariantContext.Instance, name));
 }
コード例 #20
0
 /// <summary>
 /// Called from generated code, helper to do name assignment.
 /// Order of parameters matches the codegen flow.
 /// </summary>
 public static object SetNameReorder(object value, CodeContext context, SymbolId name)
 {
     context.LanguageContext.SetName(context, name, value);
     return(value);
 }
コード例 #21
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Determines if this context or any outer scope contains the defined name.
 /// </summary>
 public bool ContainsName(SymbolId name)
 {
     return(ContainsName(InvariantContext.Instance, name));
 }
コード例 #22
0
 /// <summary>
 /// Called from generated code, helper to do name assignment
 /// </summary>
 public static void SetName(CodeContext context, SymbolId name, object value)
 {
     context.LanguageContext.SetName(context, name, value);
 }
コード例 #23
0
ファイル: Scope.cs プロジェクト: JamesTryand/IronScheme
 /// <summary>
 /// Removes the provided name from this scope
 /// </summary>
 public void RemoveName(SymbolId name)
 {
     RemoveName(InvariantContext.Instance, name);
 }
コード例 #24
0
 /// <summary>
 /// Called from generated code, helper to remove a name
 /// </summary>
 public static object RemoveName(CodeContext context, SymbolId name)
 {
     context.LanguageContext.RemoveName(context, name);
     return(null);
 }
コード例 #25
0
 /// <summary>
 /// Attempts to set the name in the provided scope using the current language's semantics.
 /// </summary>
 public virtual void SetName(CodeContext context, SymbolId name, object value)
 {
     context.Scope.SetName(name, value);
 }
コード例 #26
0
        public static void InitializeModuleField(CodeContext context, SymbolId name, ref ModuleGlobalWrapper wrapper)
        {
            ModuleGlobalCache mgc = context.LanguageContext.GetModuleCache(name);

            wrapper = new ModuleGlobalWrapper(context, mgc, name);
        }
コード例 #27
0
 /// <summary>
 /// Attemps to lookup a global variable using the language's semantics called from
 /// the provided Scope.  The default implementation will attempt to lookup the variable
 /// at the host level.
 /// </summary>
 public virtual bool TryLookupGlobal(CodeContext context, SymbolId name, out object value)
 {
     return(ScriptDomainManager.CurrentManager.Host.TryGetVariable(Engine, name, out value));
 }
コード例 #28
0
 protected internal abstract bool TryGetExtraValue(SymbolId key, out object value);