nw::script::Ast

struct Ast

Public Functions

Ast(Context *ctx)
Ast(const Ast&) = delete
Ast(Ast&&) = default
Ast &operator=(const Ast&) = delete
Ast &operator=(Ast&&) = default
template<typename T, typename ...Args>
inline T *create_node(Args&&... args)
inline void accept(BaseVisitor *visitor)
StringView find_comment(size_t line) const noexcept

Finds first comment that the source range of which ends on line or line - 1.

Public Members

Context *ctx_
Vector<Statement*> decls
Vector<Include> includes
std::unordered_map<String, String> defines
Vector<Comment> comments
Vector<size_t> line_map