Spicy
Public Member Functions | List of all members
hilti::declaration::ImportedModule Class Reference

#include <imported-module.h>

Inheritance diagram for hilti::declaration::ImportedModule:
hilti::DeclarationBase hilti::NodeBase hilti::trait::isDeclaration hilti::trait::isNode hilti::trait::isNode

Public Member Functions

 ImportedModule (ID id, const std::string &parse_extension, Meta m=Meta())
 
 ImportedModule (ID id, const std::string &parse_extension, std::optional< ID > search_scope, Meta m=Meta())
 
 ImportedModule (ID id, const std::string &parse_extension, std::optional< ID > search_scope, std::vector< hilti::rt::filesystem::path > search_dirs, Meta m=Meta())
 
 ImportedModule (ID id, hilti::rt::filesystem::path path, Meta m=Meta())
 
hilti::rt::filesystem::path parseExtension () const
 
auto path () const
 
auto scope () const
 
auto unit () const
 
const auto & searchDirectories () const
 
void setUnit (std::shared_ptr< Unit > unit)
 
bool operator== (const ImportedModule &other) const
 
bool isConstant () const
 
const IDid () const
 
Linkage linkage () const
 
std::string displayName () const
 
auto isEqual (const Declaration &other) const
 
node::Properties properties () const
 
- Public Member Functions inherited from hilti::DeclarationBase
const IDcanonicalID () const
 
void setCanonicalID (ID id)
 
- Public Member Functions inherited from hilti::NodeBase
 NodeBase (Meta meta)
 
 NodeBase (std::vector< Node > children, Meta meta)
 
template<typename T >
const T & child (int i) const
 
template<typename T >
void assertChildIsA (int i)
 
template<typename T >
auto children (int begin, int end) const
 
auto childRefs (int begin, int end)
 
template<typename T >
hilti::node::Set< T > childrenOfType () const
 
template<typename T >
std::vector< NodeRefchildRefsOfType () const
 
void addChild (Node n)
 
const auto & children () const
 
auto & children ()
 
auto & meta () const
 
void setMeta (Meta m)
 
bool pruneWalk () const
 

Detailed Description

AST node for a declaration of imported module.

We associate an explicit "parse extension" with an imported module that specifies which plugin is to parse the code into an AST. Note that this does not specify the semantics of the resulting AST. The imported AST will always be processed by the same plugin that is in charge of the declaration itself as well. This separation allows, for example, to import a piece of HILTI source code into a Spicy AST.

Member Function Documentation

◆ displayName()

std::string hilti::declaration::ImportedModule::displayName ( ) const
inline

Implements Declaration interface.

◆ id()

const ID& hilti::declaration::ImportedModule::id ( ) const
inline

Implements Declaration interface.

◆ isConstant()

bool hilti::declaration::ImportedModule::isConstant ( ) const
inline

Implements Declaration interface.

◆ isEqual()

auto hilti::declaration::ImportedModule::isEqual ( const Declaration other) const
inline

Implements Declaration interface.

◆ linkage()

Linkage hilti::declaration::ImportedModule::linkage ( ) const
inline

Implements Declaration interface.

◆ properties()

node::Properties declaration::ImportedModule::properties ( ) const

Implements Node interface.

◆ setUnit()

void hilti::declaration::ImportedModule::setUnit ( std::shared_ptr< Unit unit)
inline

Sets both extensions to the same value.


The documentation for this class was generated from the following files: