#include <IdentifierResolver.h>
Classes | |
struct | ArityPred |
struct | NullaryPred |
struct | TypePred |
Public Types | |
typedef DeclVector::iterator | DirectOverloadIter |
typedef DeclVector::iterator | IndirectOverloadIter |
typedef ValueVector::iterator | IndirectValueIter |
Public Member Functions | |
IdentifierResolver () | |
bool | resolve (IdentifierInfo *idInfo) |
void | clear () |
Resets this IdentifierResolver into its default state. | |
bool | filterOverloadsWRTArity (unsigned arity) |
bool | filterProcedures () |
bool | filterFunctionals () |
bool | filterNullaryOverloads () |
unsigned | numDirectOverloads () const |
Returns the number of direct overloads. | |
unsigned | numIndirectValues () const |
Returns the number of indirect values. | |
unsigned | numIndirectOverloads () const |
Returns the number of indirect overloads. | |
unsigned | numResolvedDecls () const |
Returns the total number of declarations contained in this resolver. | |
unsigned | numOverloads () const |
Returns the total number of overloaded declarations. | |
bool | hasDirectValue () const |
Returns true if a direct value has been resolved. | |
bool | hasDirectOverloads () const |
Returns true if direct overloads have been resolved. | |
bool | hasIndirectValues () const |
Returns true if indirect values have been resolved. | |
bool | hasIndirectOverloads () const |
Returns true if indirect overloads have been resolved. | |
ValueDecl * | getDirectValue () const |
Decl * | getDirectOverload (unsigned i) const |
Returns the i'th direct overload. The index must be in range. | |
ValueDecl * | getIndirectValue (unsigned i) const |
Returns the i'th indirect value. The index must be in range. | |
Decl * | getIndirectOverload (unsigned i) const |
Returns the i'th indirect overload. The index must be in range. | |
DirectOverloadIter | beginDirectOverloads () |
DirectOverloadIter | endDirectOverloads () |
IndirectOverloadIter | beginIndirectOverloads () |
IndirectOverloadIter | endIndirectOverloads () |
IndirectValueIter | beginIndirectValues () |
IndirectValueIter | endIndirectValues () |
Definition at line 17 of file IdentifierResolver.h.
typedef DeclVector::iterator comma::IdentifierResolver::DirectOverloadIter |
Definition at line 105 of file IdentifierResolver.h.
typedef DeclVector::iterator comma::IdentifierResolver::IndirectOverloadIter |
Definition at line 106 of file IdentifierResolver.h.
typedef ValueVector::iterator comma::IdentifierResolver::IndirectValueIter |
Definition at line 107 of file IdentifierResolver.h.
comma::IdentifierResolver::IdentifierResolver | ( | ) | [inline] |
Definition at line 27 of file IdentifierResolver.h.
DirectOverloadIter comma::IdentifierResolver::beginDirectOverloads | ( | ) | [inline] |
Definition at line 109 of file IdentifierResolver.h.
IndirectOverloadIter comma::IdentifierResolver::beginIndirectOverloads | ( | ) | [inline] |
Definition at line 116 of file IdentifierResolver.h.
IndirectValueIter comma::IdentifierResolver::beginIndirectValues | ( | ) | [inline] |
Definition at line 123 of file IdentifierResolver.h.
void comma::IdentifierResolver::clear | ( | ) |
Resets this IdentifierResolver into its default state.
DirectOverloadIter comma::IdentifierResolver::endDirectOverloads | ( | ) | [inline] |
Definition at line 112 of file IdentifierResolver.h.
IndirectOverloadIter comma::IdentifierResolver::endIndirectOverloads | ( | ) | [inline] |
Definition at line 119 of file IdentifierResolver.h.
IndirectValueIter comma::IdentifierResolver::endIndirectValues | ( | ) | [inline] |
Definition at line 127 of file IdentifierResolver.h.
bool IdentifierResolver::filterFunctionals | ( | ) |
Filters out all functional declarations (functions and numeration literals) from the results and returns true if the resolver was modified.
Definition at line 54 of file IdentifierResolver.cpp.
bool IdentifierResolver::filterNullaryOverloads | ( | ) |
Filters out all nullary overloads (procedures and functions of arity 0, as well as enumeration literals). Returns true if the resolver was modified.
Definition at line 61 of file IdentifierResolver.cpp.
bool IdentifierResolver::filterOverloadsWRTArity | ( | unsigned | arity | ) |
Filters the overloaded results, keeping only those overloads with the specified arity. Returns true if the filter modified the result.
Definition at line 44 of file IdentifierResolver.cpp.
bool IdentifierResolver::filterProcedures | ( | ) |
Filters out all procedure declarations from the results and returns true if the resolver was modified.
Definition at line 49 of file IdentifierResolver.cpp.
Decl* comma::IdentifierResolver::getDirectOverload | ( | unsigned | i | ) | const [inline] |
Returns the i'th
direct overload. The index must be in range.
Definition at line 88 of file IdentifierResolver.h.
ValueDecl* comma::IdentifierResolver::getDirectValue | ( | ) | const [inline] |
Returns the direct value associated with this resolver, or 0 if no such declaration could be resolved.
Definition at line 85 of file IdentifierResolver.h.
Decl* comma::IdentifierResolver::getIndirectOverload | ( | unsigned | i | ) | const [inline] |
Returns the i'th
indirect overload. The index must be in range.
Definition at line 100 of file IdentifierResolver.h.
ValueDecl* comma::IdentifierResolver::getIndirectValue | ( | unsigned | i | ) | const [inline] |
Returns the i'th
indirect value. The index must be in range.
Definition at line 94 of file IdentifierResolver.h.
bool comma::IdentifierResolver::hasDirectOverloads | ( | ) | const [inline] |
Returns true if direct overloads have been resolved.
Definition at line 75 of file IdentifierResolver.h.
bool comma::IdentifierResolver::hasDirectValue | ( | ) | const [inline] |
Returns true if a direct value has been resolved.
Definition at line 72 of file IdentifierResolver.h.
bool comma::IdentifierResolver::hasIndirectOverloads | ( | ) | const [inline] |
Returns true if indirect overloads have been resolved.
Definition at line 81 of file IdentifierResolver.h.
bool comma::IdentifierResolver::hasIndirectValues | ( | ) | const [inline] |
Returns true if indirect values have been resolved.
Definition at line 78 of file IdentifierResolver.h.
unsigned comma::IdentifierResolver::numDirectOverloads | ( | ) | const [inline] |
unsigned comma::IdentifierResolver::numIndirectOverloads | ( | ) | const [inline] |
unsigned comma::IdentifierResolver::numIndirectValues | ( | ) | const [inline] |
unsigned comma::IdentifierResolver::numOverloads | ( | ) | const [inline] |
Returns the total number of overloaded declarations.
Definition at line 67 of file IdentifierResolver.h.
unsigned IdentifierResolver::numResolvedDecls | ( | ) | const |
Returns the total number of declarations contained in this resolver.
Definition at line 35 of file IdentifierResolver.cpp.
bool IdentifierResolver::resolve | ( | IdentifierInfo * | idInfo | ) |
Resolves the given identifier and returns true if any bindings were resolved.
Definition at line 66 of file IdentifierResolver.cpp.