Joos1W Compiler Framework
All Classes Functions Typedefs Pages
ast::FieldDecl Class Referencefinal

Represents a typed declaration with access modifiers. More...

#include <Decl.h>

Inheritance diagram for ast::FieldDecl:

Public Member Functions

 FieldDecl (BumpAllocator &alloc, SourceRange location, Modifiers modifiers, Type *type, string_view name, Expr *init, ScopeID const *scope) noexcept
 
std::ostream & print (std::ostream &os, int indentation=0) const override
 
int printDotNode (DotPrinter &dp) const override
 
bool hasCanonicalName () const override
 Returns if the declaration has a canonical name.
 
auto modifiers () const
 
void setParent (DeclContext *parent) override
 Sets the parent. See parent().
 
- Public Member Functions inherited from ast::TypedDecl
 TypedDecl (BumpAllocator &alloc, SourceRange location, Type *type, string_view name, Expr *init, ScopeID const *scope) noexcept
 
Type const * type () const
 
Typemut_type () const
 
utils::Generator< ast::AstNode const * > children () const override final
 Returns a generator for the children of this node.
 
bool hasInit () const
 
Expr const * init () const
 
Exprmut_init ()
 
SourceRange location () const override
 Returns the location of the declaration. This is an abstract method to allow abstract classes of Decl without location.
 
ScopeID const * scope () const
 
- Public Member Functions inherited from ast::Decl
 Decl (BumpAllocator &alloc, std::string_view name) noexcept
 
std::string_view name () const
 Gets the simple name of this declaration.
 
DeclContextparent () const
 Gets the context in which this declaration is declared.
 
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 DeclContext const * asDeclContext () const
 
- Public Member Functions inherited from ast::AstNode
 AstNode (const AstNode &)=delete
 
 AstNode (AstNode &&)=delete
 
AstNodeoperator= (const AstNode &)=delete
 
AstNodeoperator= (AstNode &&)=delete
 
std::ostream & printDot (std::ostream &os) const
 
void dump () const
 
utils::Generator< AstNode * > mut_children ()
 Returns a generator for the mutable children of this node.
 

Additional Inherited Members

- Static Protected Member Functions inherited from ast::AstNode
static std::string indent (int indentation)
 Get a string of spaces for indentation. More...
 
- Protected Attributes inherited from ast::Decl
std::pmr::string canonicalName_
 

Detailed Description

Represents a typed declaration with access modifiers.

Definition at line 57 of file Decl.h.


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