Base class for all declarations.
More...
#include <AstNode.h>
|
| Decl (BumpAllocator &alloc, std::string_view name) noexcept |
|
std::string_view | name () const |
| Gets the simple name of this declaration.
|
|
DeclContext * | parent () const |
| Gets the context in which this declaration is declared.
|
|
virtual void | setParent (DeclContext *parent) |
| Sets the parent. See parent().
|
|
std::string_view | getCanonicalName () const |
| Gets the fully qualified name of this declaration. Returns undefined value if the declaration does not have a canonical name.
|
|
virtual bool | hasCanonicalName () const =0 |
| Returns if the declaration has a canonical name.
|
|
virtual SourceRange | location () const =0 |
| Returns the location of the declaration. This is an abstract method to allow abstract classes of Decl without location.
|
|
virtual DeclContext const * | asDeclContext () const |
|
| AstNode (const AstNode &)=delete |
|
| AstNode (AstNode &&)=delete |
|
AstNode & | operator= (const AstNode &)=delete |
|
AstNode & | operator= (AstNode &&)=delete |
|
std::ostream & | printDot (std::ostream &os) const |
|
virtual std::ostream & | print (std::ostream &os, int indentation=0) const =0 |
|
virtual int | printDotNode (DotPrinter &dp) const =0 |
|
void | dump () const |
|
virtual utils::Generator< AstNode const * > | children () const =0 |
| Returns a generator for the children of this node.
|
|
utils::Generator< AstNode * > | mut_children () |
| Returns a generator for the mutable children of this node.
|
|
|
std::pmr::string | canonicalName_ |
|
|
static std::string | indent (int indentation) |
| Get a string of spaces for indentation. More...
|
|
Base class for all declarations.
Definition at line 87 of file AstNode.h.
The documentation for this class was generated from the following file: