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

#include "pt-id.h"

Inheritance diagram for tree_identifier:
tree_expression tree tree_black_hole

Public Member Functions

 tree_identifier (const symbol_record &s, int l=-1, int c=-1)
 
 tree_identifier (int l=-1, int c=-1)
 
 ~tree_identifier ()=default
 
void accept (tree_walker &tw)
 
tree_identifierdup (symbol_scope &scope) const
 
void eval_undefined_error ()
 
octave_value evaluate (tree_evaluator &tw, int nargout=1)
 
octave_value_list evaluate_n (tree_evaluator &tw, int nargout=1)
 
virtual bool is_black_hole () const
 
bool is_identifier () const
 
octave_lvalue lvalue (tree_evaluator &tw)
 
bool lvalue_ok () const
 
void mark_as_formal_parameter ()
 
std::string name () const
 
void static_workspace_error ()
 
symbol_record symbol () const
 
- Public Member Functions inherited from tree_expression
 tree_expression (int l=-1, int c=-1)
 
virtual ~tree_expression ()=default
 
virtual void copy_base (const tree_expression &e)
 
virtual bool is_assignment_expression () const
 
virtual bool is_binary_expression () const
 
virtual bool is_boolean_expression () const
 
virtual bool is_colon_expression () const
 
virtual bool is_constant () const
 
bool is_for_cmd_expr () const
 
virtual bool is_index_expression () const
 
virtual bool is_matrix () const
 
bool is_postfix_indexed () const
 
virtual bool is_prefix_expression () const
 
virtual bool is_unary_expression () const
 
virtual bool iscell () const
 
void mark_as_for_cmd_expr ()
 
tree_expressionmark_in_parens ()
 
virtual std::string oper () const
 
virtual std::string original_text () const
 
int paren_count () const
 
char postfix_index () const
 
bool print_result () const
 
virtual bool rvalue_ok () const
 
tree_expressionset_postfix_index (char type)
 
tree_expressionset_print_flag (bool print)
 
- Public Member Functions inherited from tree
 tree (int l=-1, int c=-1)
 
virtual ~tree ()=default
 
const std::string bp_cond () const
 
virtual int column () const
 
void column (int c)
 
virtual void delete_breakpoint ()
 
bool is_active_breakpoint (tree_evaluator &tw) const
 
bool is_breakpoint () const
 
virtual int line () const
 
void line (int l)
 
bool meets_bp_condition (tree_evaluator &tw) const
 
virtual void set_breakpoint (const std::string &condition)
 
void set_location (int l, int c)
 
std::string str_print_code ()
 

Protected Attributes

symbol_record m_sym
 
- Protected Attributes inherited from tree_expression
bool m_for_cmd_expr
 
int m_num_parens
 
char m_postfix_index_type
 
bool m_print_flag
 

Friends

class tree_index_expression
 

Detailed Description

Definition at line 50 of file pt-id.h.

Constructor & Destructor Documentation

◆ tree_identifier() [1/2]

tree_identifier::tree_identifier ( int  l = -1,
int  c = -1 
)
inline

Definition at line 56 of file pt-id.h.

Referenced by dup().

◆ tree_identifier() [2/2]

tree_identifier::tree_identifier ( const symbol_record s,
int  l = -1,
int  c = -1 
)
inline

Definition at line 59 of file pt-id.h.

◆ ~tree_identifier()

tree_identifier::~tree_identifier ( )
default

Member Function Documentation

◆ accept()

◆ dup()

tree_identifier * tree_identifier::dup ( symbol_scope scope) const
virtual

Implements tree_expression.

Reimplemented in tree_black_hole.

Definition at line 77 of file pt-id.cc.

References tree_identifier(), tree::column(), tree_expression::copy_base(), symbol_scope::find_symbol(), and name().

Referenced by tree_decl_elt::dup().

◆ eval_undefined_error()

void tree_identifier::eval_undefined_error ( )

Definition at line 44 of file pt-id.cc.

References tree::column(), error_with_id(), tree::line(), maybe_missing_function_hook(), and name().

Referenced by evaluate_n().

◆ evaluate()

octave_value tree_identifier::evaluate ( tree_evaluator tw,
int  nargout = 1 
)
inlinevirtual

Implements tree_expression.

Definition at line 92 of file pt-id.h.

References evaluate_n(), octave_value_list::length(), and octave_value().

Referenced by tree_evaluator::evaluate().

◆ evaluate_n()

◆ is_black_hole()

virtual bool tree_identifier::is_black_hole ( ) const
inlinevirtual

Reimplemented in tree_black_hole.

Definition at line 71 of file pt-id.h.

Referenced by tree_evaluator::is_variable(), and base_parser::validate_param_list().

◆ is_identifier()

bool tree_identifier::is_identifier ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 67 of file pt-id.h.

◆ lvalue()

octave_lvalue tree_identifier::lvalue ( tree_evaluator tw)
virtual

◆ lvalue_ok()

bool tree_identifier::lvalue_ok ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 78 of file pt-id.h.

Referenced by tree_decl_elt::lvalue_ok(), and tree_checker::visit_try_catch_command().

◆ mark_as_formal_parameter()

void tree_identifier::mark_as_formal_parameter ( )
inline

Definition at line 73 of file pt-id.h.

References m_sym, and symbol_record::mark_formal().

Referenced by tree_decl_elt::mark_as_formal_parameter().

◆ name()

std::string tree_identifier::name ( ) const
inlinevirtual

◆ static_workspace_error()

void tree_identifier::static_workspace_error ( )
inline

Definition at line 84 of file pt-id.h.

References error(), and name().

Referenced by evaluate_n(), and lvalue().

◆ symbol()

symbol_record tree_identifier::symbol ( ) const
inline

Friends And Related Function Documentation

◆ tree_index_expression

friend class tree_index_expression
friend

Definition at line 52 of file pt-id.h.

Member Data Documentation

◆ m_sym

symbol_record tree_identifier::m_sym
protected

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