#include <Environment.hpp>
Public Member Functions | |
Environment (Environment *outer=NULL) | |
Environment * | getOuterEnv () const |
bool | addOrdinaryName (const std::string &name, Type *type, NameDescription::StorageClassSpecTag storageSpec, NameDescription::DeclarationLocation loc, NameDescription **nd) |
Environment * | lookupOrdinaryName (const std::string &name, NameDescription **nd) |
bool | addTagName (const std::string &name, Type *type, NameDescription::DeclarationLocation loc) |
Environment * | lookupTagName (const std::string &name, NameDescription **nd) |
Private Attributes | |
Environment * | outer_ |
OrdinaryNames | ordinaryNames_ |
TagNames | tagNames_ |
Definition at line 66 of file Environment.hpp.
cfront::Environment::Environment | ( | Environment * | outer = NULL |
) | [inline] |
Definition at line 68 of file Environment.hpp.
Environment* cfront::Environment::getOuterEnv | ( | ) | const [inline] |
Definition at line 73 of file Environment.hpp.
References outer_.
Referenced by cfront::CAnalyzer::removeEnv().
bool cfront::Environment::addOrdinaryName | ( | const std::string & | name, | |
Type * | type, | |||
NameDescription::StorageClassSpecTag | storageSpec, | |||
NameDescription::DeclarationLocation | loc, | |||
NameDescription ** | nd | |||
) | [inline] |
Add the ordinary name to this environment.
[in] | name | |
[in] | type | |
[in] | storageSpec | |
[out] | nd | |
[in] | loc |
Definition at line 88 of file Environment.hpp.
References cfront::NameDescription::getType(), ordinaryNames_, and cfront::NameDescription::setType().
Referenced by cfront::CAnalyzer::addNameAndType().
Environment* cfront::Environment::lookupOrdinaryName | ( | const std::string & | name, | |
NameDescription ** | nd | |||
) | [inline] |
Look up the ordinary name from this and the outer environments.
[in] | name | |
[out] | nd | The NameDescription of the found name. If the name not found, this value is not to set. |
Definition at line 124 of file Environment.hpp.
References lookupOrdinaryName(), ordinaryNames_, and outer_.
Referenced by cfront::CAnalyzer::evalConstExpr(), cfront::CAnalyzer::isTypedefName(), lookupOrdinaryName(), and cfront::CAnalyzer::typeExpr().
bool cfront::Environment::addTagName | ( | const std::string & | name, | |
Type * | type, | |||
NameDescription::DeclarationLocation | loc | |||
) | [inline] |
Add the tag name to this environment.
Definition at line 143 of file Environment.hpp.
References addTagName(), cfront::NameDescription::getType(), outer_, cfront::NameDescription::setType(), cfront::NameDescription::SS_NONE, and tagNames_.
Referenced by addTagName(), and cfront::CAnalyzer::checkStructOrUnionDefinition().
Environment* cfront::Environment::lookupTagName | ( | const std::string & | name, | |
NameDescription ** | nd | |||
) | [inline] |
Look up the tag name from this and the outer environments.
[in] | name | |
[out] | nd | The NameDescription of the found name. If the name not found, this value is not to set. |
Definition at line 175 of file Environment.hpp.
References lookupTagName(), outer_, and tagNames_.
Referenced by cfront::CAnalyzer::checkStructOrUnionDefinition(), and lookupTagName().
Environment* cfront::Environment::outer_ [private] |
Definition at line 209 of file Environment.hpp.
Referenced by addTagName(), getOuterEnv(), lookupOrdinaryName(), and lookupTagName().
Definition at line 211 of file Environment.hpp.
Referenced by addOrdinaryName(), and lookupOrdinaryName().
TagNames cfront::Environment::tagNames_ [private] |