JavaScript is disabled on your browser.
Skip navigation links
gnu.expr

Class NameLookup

  • All Implemented Interfaces:
    java.util.Map<java.lang.Object,Declaration>


    public class NameLookup
    extends GeneralHashTable<java.lang.Object,Declaration>
    Manages the set of declarations "currently" in scope.
    • Constructor Detail

      • NameLookup

        public NameLookup(Language language)
    • Method Detail

      • getLanguage

        public Language getLanguage()
      • setLanguage

        public void setLanguage(Language language)
      • getInstance

        public static NameLookup getInstance(Environment env,
         Language language)
        Get or create a NameLookup instance for a given Environment. We want the same NameLookup instance to be used for multiple interactive commands in the same "session", to preserve top-level declarations. We do that by registering it in the Environment.
      • doSaveTopLevelRedefs

        public boolean doSaveTopLevelRedefs()
        When true, top-level defs should push rather then replace old ones. Otherwise, a module-level declaration should replace a matching previous declaration, to avoid leaks. However, sometimes we temporarily push new declarations that should not permanently replace old declarations - for example when a hygienic macro changes the current scope.
      • pushSaveTopLevelRedefs

        public void pushSaveTopLevelRedefs()
      • popSaveTopLevelRedefs

        public void popSaveTopLevelRedefs()
      • removeSubsumed

        public void removeSubsumed(Declaration decl)
        Remove visible declarations subsumed (hidden) by a given declaration. This is primarily used to avoid memory leaks.
      • subsumedBy

        protected boolean subsumedBy(Declaration decl,
         Declaration other)
        True if decl subsumes (hides) other.
      • lookup

        public Declaration lookup(java.lang.Object symbol,
         int namespace)
      • lookup

        public Declaration lookup(java.lang.Object symbol,
         boolean function)
      • getCompletingSymbols

        public void getCompletingSymbols(java.lang.String initialPart,
         int namespace,
         java.util.List<? super java.lang.String> candidates)
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /