#ifndef SLANG_LOOKUP_H_INCLUDED #define SLANG_LOOKUP_H_INCLUDED #include "syntax.h" namespace Slang { struct SemanticsVisitor; // Take an existing lookup result and refine it to only include // results that pass the given `LookupMask`. LookupResult refineLookup(LookupResult const& inResult, LookupMask mask); // Ensure that the dictionary for name-based member lookup has been // built for the given container declaration. void buildMemberDictionary(ContainerDecl* decl); // Look up a name in the given scope, proceeding up through // parent scopes as needed. LookupResult lookUp( Session* session, SemanticsVisitor* semantics, Name* name, RefPtr scope); // perform lookup within the context of a particular container declaration, // and do *not* look further up the chain LookupResult lookUpLocal( Session* session, SemanticsVisitor* semantics, Name* name, DeclRef containerDeclRef); // Perform member lookup in the context of a type LookupResult lookUpMember( Session* session, SemanticsVisitor* semantics, Name* name, Type* type); // TODO: this belongs somewhere else QualType getTypeForDeclRef( Session* session, SemanticsVisitor* sema, DiagnosticSink* sink, DeclRef declRef, RefPtr* outTypeResult); QualType getTypeForDeclRef( Session* session, DeclRef declRef); } #endif