28 std::vector<NodePtr<>> _statements;
47 , _statements{ std::move(statements) }
58 [[nodiscard]] TCALC_INLINE
auto&
statements() const noexcept
68 TCALC_INLINE
auto&
statements() noexcept {
return _statements; }
77 _statements.push_back(std::move(statement));
98 , _path{ std::move(path) }
109 [[nodiscard]] TCALC_INLINE
auto&
path() const noexcept {
return _path; }
116 TCALC_INLINE
auto&
path() noexcept {
return _path; }
123 TCALC_INLINE
void path(std::string path)
noexcept { _path = std::move(path); }
Base class for AST nodes.
Definition node.hpp:87
Program import node.
Definition program.hpp:86
TCALC_INLINE auto & path() noexcept
Get path.
Definition program.hpp:116
TCALC_INLINE void path(std::string path) noexcept
Set path.
Definition program.hpp:123
ProgramImportNode(std::string path)
Construct a new Program Import Node object.
Definition program.hpp:96
TCALC_INLINE auto & path() const noexcept
Get path.
Definition program.hpp:109
Program node.
Definition program.hpp:26
TCALC_INLINE auto & statements() const noexcept
Get statements.
Definition program.hpp:58
TCALC_INLINE void push_statement(NodePtr<> statement)
Push a statement.
Definition program.hpp:75
TCALC_INLINE auto & statements() noexcept
Get statements.
Definition program.hpp:68
ProgramNode(std::vector< NodePtr<> > statements)
Construct a new Program Node object with statements.
Definition program.hpp:45
ProgramNode()
Construct a new Program Node object without statements.
Definition program.hpp:35
Base class for AST nodes.
std::shared_ptr< NT > NodePtr
Shared pointer to a node.
Definition node.hpp:119
NodeType
AST node type.
Definition node.hpp:30