|
Yume
|
Represents "any" kind of ast node of type T. See AnyExpr, AnyStmt and AnyType.
More...
#include <ast.hpp>


Public Member Functions | |
| AnyBase ()=delete | |
| AnyBase (T *raw_ptr) | |
| template<std::convertible_to< unique_ptr< T > > U> | |
| AnyBase (U uptr) noexcept | |
| AnyBase (OptionalAnyBase< T > &&other) | |
| auto | operator-> () const -> const T * |
| auto | operator* () const -> const T & |
| auto | operator-> () -> T * |
| auto | operator* () -> T & |
| auto | raw_ptr () const -> const T * |
| auto | raw_ptr () -> T * |
Public Member Functions inherited from yume::ast::OptionalAnyBase< T > | |
| OptionalAnyBase () | |
| OptionalAnyBase (T *raw_ptr) | |
| template<std::convertible_to< unique_ptr< T > > U> | |
| OptionalAnyBase (U uptr) | |
| OptionalAnyBase (std::nullopt_t) | |
| OptionalAnyBase (optional< unique_ptr< T > > opt_uptr) | |
| auto | operator-> () const -> const T * |
| auto | operator* () const -> const T & |
| auto | operator-> () -> T * |
| auto | operator* () -> T & |
| operator bool () const | |
| auto | has_value () const -> bool |
| auto | raw_ptr () const -> const T * |
| auto | raw_ptr () -> T * |
Represents "any" kind of ast node of type T. See AnyExpr, AnyStmt and AnyType.
This template exists to avoid passing around unique_ptr<T>s around in code that deals with AST nodes containing other generic nodes, such as Compound. This class also has strict nullptr checks when constructing, and cannot be default constructed. See OptionalAnyBase for a similar class which may be null.
|
delete |
|
inlineexplicit |
Definition at line 189 of file ast.hpp.
References yume::ast::AnyBase< T >::raw_ptr(), and YUME_ASSERT.
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 200 of file ast.hpp.
Referenced by yume::ast::AnyBase< T >::AnyBase(), yume::semantic::TypeWalker::expression(), and yume::semantic::TypeWalker::statement().