GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
tree_decl_elt Class Reference

#include "pt-decl.h"

Collaboration diagram for tree_decl_elt:

Public Types

enum  decl_type { unknown , global , persistent }
 

Public Member Functions

 tree_decl_elt (const tree_decl_elt &)=delete
 
 tree_decl_elt (tree_identifier *i, tree_expression *e=nullptr)
 
 ~tree_decl_elt (void)
 
void accept (tree_walker &tw)
 
tree_decl_eltdup (symbol_scope &scope) const
 
tree_expressionexpression (void)
 
tree_identifierident (void)
 
bool is_global (void) const
 
bool is_persistent (void) const
 
octave_lvalue lvalue (tree_evaluator &tw)
 
bool lvalue_ok (void)
 
void mark_as_formal_parameter (void)
 
void mark_global (void)
 
void mark_persistent (void)
 
std::string name (void) const
 
tree_decl_eltoperator= (const tree_decl_elt &)=delete
 

Private Attributes

tree_expressionm_expr
 
tree_identifierm_id
 
decl_type type
 

Detailed Description

Definition at line 49 of file pt-decl.h.

Member Enumeration Documentation

◆ decl_type

Enumerator
unknown 
global 
persistent 

Definition at line 53 of file pt-decl.h.

Constructor & Destructor Documentation

◆ tree_decl_elt() [1/2]

tree_decl_elt::tree_decl_elt ( tree_identifier i,
tree_expression e = nullptr 
)

Definition at line 47 of file pt-decl.cc.

References error().

Referenced by dup().

◆ tree_decl_elt() [2/2]

tree_decl_elt::tree_decl_elt ( const tree_decl_elt )
delete

◆ ~tree_decl_elt()

tree_decl_elt::~tree_decl_elt ( void  )

Definition at line 54 of file pt-decl.cc.

References m_expr, and m_id.

Member Function Documentation

◆ accept()

void tree_decl_elt::accept ( tree_walker tw)
inline

◆ dup()

tree_decl_elt * tree_decl_elt::dup ( symbol_scope scope) const

Definition at line 61 of file pt-decl.cc.

References tree_decl_elt(), tree_identifier::dup(), tree_expression::dup(), m_expr, and m_id.

Referenced by tree_parameter_list::dup().

◆ expression()

tree_expression* tree_decl_elt::expression ( void  )
inline

◆ ident()

◆ is_global()

bool tree_decl_elt::is_global ( void  ) const
inline

Definition at line 83 of file pt-decl.h.

References global, and type.

Referenced by tree_evaluator::visit_decl_elt().

◆ is_persistent()

bool tree_decl_elt::is_persistent ( void  ) const
inline

Definition at line 86 of file pt-decl.h.

References persistent, and type.

Referenced by tree_evaluator::visit_decl_elt().

◆ lvalue()

octave_lvalue tree_decl_elt::lvalue ( tree_evaluator tw)
inline

Definition at line 77 of file pt-decl.h.

References tree_identifier::lvalue(), and m_id.

◆ lvalue_ok()

bool tree_decl_elt::lvalue_ok ( void  )
inline

Definition at line 75 of file pt-decl.h.

References tree_identifier::lvalue_ok(), and m_id.

◆ mark_as_formal_parameter()

void tree_decl_elt::mark_as_formal_parameter ( void  )
inline

◆ mark_global()

void tree_decl_elt::mark_global ( void  )
inline

Definition at line 82 of file pt-decl.h.

References global, and type.

Referenced by tree_decl_init_list::mark_global().

◆ mark_persistent()

void tree_decl_elt::mark_persistent ( void  )
inline

Definition at line 85 of file pt-decl.h.

References persistent, and type.

Referenced by tree_decl_init_list::mark_persistent().

◆ name()

std::string tree_decl_elt::name ( void  ) const
inline

◆ operator=()

tree_decl_elt& tree_decl_elt::operator= ( const tree_decl_elt )
delete

Member Data Documentation

◆ m_expr

tree_expression* tree_decl_elt::m_expr
private

Definition at line 109 of file pt-decl.h.

Referenced by ~tree_decl_elt(), dup(), and expression().

◆ m_id

tree_identifier* tree_decl_elt::m_id
private

Definition at line 106 of file pt-decl.h.

Referenced by ~tree_decl_elt(), dup(), ident(), lvalue(), lvalue_ok(), mark_as_formal_parameter(), and name().

◆ type

decl_type tree_decl_elt::type
private

Definition at line 103 of file pt-decl.h.

Referenced by is_global(), is_persistent(), mark_global(), and mark_persistent().


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