Yume
Public Member Functions | Public Attributes | List of all members
yume::Const Struct Reference

A constant declaration in the compiler. More...

#include <vals.hpp>

Collaboration diagram for yume::Const:
Collaboration graph
[legend]

Public Member Functions

 Const (ast::ConstDecl &ast_decl, ast::Program *member=nullptr, optional< ty::Type > parent=std::nullopt) noexcept
 
auto ast () const noexcept -> const auto &
 
auto ast () noexcept -> auto &
 
auto get_self_ty () const noexcept -> optional< ty::Type >
 
auto name () const noexcept -> string
 
auto referred_to_by (const ast::ConstExpr &expr) const -> bool
 

Public Attributes

ast::ConstDeclcn_ast
 
optional< ty::Typeself_ty
 If this function is in the body of a struct, this points to its type. More...
 
ast::Programmember
 The program this declaration is a member of. More...
 
llvm::GlobalVariable * llvm {}
 

Detailed Description

A constant declaration in the compiler.

Definition at line 174 of file vals.hpp.

Constructor & Destructor Documentation

◆ Const()

yume::Const::Const ( ast::ConstDecl ast_decl,
ast::Program member = nullptr,
optional< ty::Type parent = std::nullopt 
)
inlinenoexcept

Definition at line 182 of file vals.hpp.

Member Function Documentation

◆ ast() [1/2]

auto yume::Const::ast ( ) const -> const auto&
inlinenoexcept

Definition at line 185 of file vals.hpp.

Referenced by yume::Compiler::define().

◆ ast() [2/2]

auto yume::Const::ast ( ) -> auto&
inlinenoexcept

Definition at line 186 of file vals.hpp.

◆ get_self_ty()

auto yume::Const::get_self_ty ( ) const -> optional<ty::Type>
inlinenoexcept

Definition at line 187 of file vals.hpp.

References yume::Struct::self_ty.

◆ name()

auto yume::Const::name ( ) const -> string
noexcept

Definition at line 69 of file vals.cpp.

References cn_ast, and yume::ast::ConstDecl::name.

◆ referred_to_by()

auto yume::Const::referred_to_by ( const ast::ConstExpr expr) const -> bool
inline

Definition at line 190 of file vals.hpp.

References yume::Struct::name(), and yume::Struct::self_ty.

Member Data Documentation

◆ cn_ast

ast::ConstDecl& yume::Const::cn_ast

Definition at line 175 of file vals.hpp.

Referenced by name().

◆ llvm

llvm::GlobalVariable* yume::Const::llvm {}

Definition at line 180 of file vals.hpp.

Referenced by yume::Compiler::define().

◆ member

ast::Program* yume::Const::member

The program this declaration is a member of.

Definition at line 179 of file vals.hpp.

◆ self_ty

optional<ty::Type> yume::Const::self_ty

If this function is in the body of a struct, this points to its type.

Definition at line 177 of file vals.hpp.


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