![]() |
ArkScript
A small, fast, functional and scripting language for video games
|
#include <StaticScope.hpp>
Public Member Functions | |
virtual | ~StaticScope ()=default |
virtual std::string | add (const std::string &name, bool is_mutable) |
Add a Declaration to the scope, given a mutability status. | |
virtual std::optional< Declaration > | get (const std::string &name, bool extensive_lookup) |
Try to return a Declaration from this scope with a given name. | |
virtual std::string | fullyQualifiedName (const std::string &name) const |
Given a Declaration name, compute its fully qualified name. | |
virtual bool | saveNamespace (std::unique_ptr< StaticScope > &) |
Save a namespace scope to help with lookup. | |
virtual bool | isNamespace () const |
virtual bool | withPrefix () const |
virtual bool | isGlob () const |
virtual std::string | prefix () const |
virtual bool | hasSymbol (const std::string &) const |
virtual bool | recursiveHasSymbol (const std::string &) const |
Private Attributes | |
std::unordered_set< Declaration > | m_vars {} |
Definition at line 45 of file StaticScope.hpp.
|
virtualdefault |
|
virtual |
Add a Declaration to the scope, given a mutability status.
name | |
is_mutable |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 8 of file StaticScope.cpp.
References m_vars.
|
nodiscardvirtual |
Given a Declaration name, compute its fully qualified name.
name |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 21 of file StaticScope.cpp.
|
nodiscardvirtual |
Try to return a Declaration from this scope with a given name.
name | |
extensive_lookup | unused in StaticScope |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 14 of file StaticScope.cpp.
References m_vars, and Ark::internal::Declaration::name.
Referenced by Ark::internal::ScopeResolver::currentScope(), and Ark::internal::NameResolutionPass::visit().
|
inlinenodiscardvirtual |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 84 of file StaticScope.hpp.
|
inlinenodiscardvirtual |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 82 of file StaticScope.hpp.
|
nodiscardvirtual |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 32 of file StaticScope.cpp.
|
inlinenodiscardvirtual |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 83 of file StaticScope.hpp.
|
inlinenodiscardvirtual |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 85 of file StaticScope.hpp.
|
virtual |
Save a namespace scope to help with lookup.
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 26 of file StaticScope.cpp.
|
inlinenodiscardvirtual |
Reimplemented in Ark::internal::NamespaceScope.
Definition at line 81 of file StaticScope.hpp.
|
private |
Definition at line 88 of file StaticScope.hpp.