Joos1W Compiler Framework
|
Represents a wrapper around a name that is being resolved. This is a list of either ExprNameWrapper or ast::ExprNodeList. More...
#include <ExprResolver.h>
Public Types | |
using | PrevTy = std::variant< ExprNameWrapper *, ast::ExprNodeList > |
Public Member Functions | |
ExprNameWrapper (Type type, ast::exprnode::MemberName *node, ast::exprnode::MemberAccess *op) | |
Build an unresolved wrapper of Type given a name node, represents a name particle represented by "node" of type "type". More... | |
void | reclassify (Type type, ast::Decl const *resolution, ast::Type const *typeResolution) |
void | reclassify (Type type, NameResolver::Pkg const *resolution) |
void | verifyInvariants (Type expectedTy) const |
ExprNameWrapper * | prevAsWrapper () const |
ExprNameWrapper * | prevIfWrapper () const |
ast::Decl const * | prevAsDecl (ExprTypeResolver &TR, NameResolver &NR, SourceRange loc) const |
If the previous value is a wrapper, unwrap the declaration. However, if the previous value is a list of expressions, return the the class representation of the type of the expression. More... | |
Type | type () const |
auto | resolution () const |
auto | typeResolution () const |
void | setPrev (std::optional< PrevTy > prev) |
std::optional< PrevTy > | prev () const |
void | dump () const |
void | dump (int indent) const |
std::string_view | type_string () const |
Public Attributes | |
ast::exprnode::MemberName * | node |
ast::exprnode::MemberAccess * | op |
Represents a wrapper around a name that is being resolved. This is a list of either ExprNameWrapper or ast::ExprNodeList.
Definition at line 43 of file ExprResolver.h.
|
inline |
Build an unresolved wrapper of Type given a name node, represents a name particle represented by "node" of type "type".
type | The Java name type of the current particle |
node | The expression node representing the particle |
op | The operator joining the particle to the previous particle. If this is a single name, then op is nullptr. |
Definition at line 71 of file ExprResolver.h.
References ExprNameWrapper().
Referenced by ExprNameWrapper().
ast::Decl const * semantic::ExprNameWrapper::prevAsDecl | ( | ExprTypeResolver & | TR, |
NameResolver & | NR, | ||
SourceRange | loc | ||
) | const |
If the previous value is a wrapper, unwrap the declaration. However, if the previous value is a list of expressions, return the the class representation of the type of the expression.
TR | The expression type resolver |
NR | The name resolver |
Definition at line 340 of file ExprResolver.cc.