GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
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 token &tok)
 
 tree_identifier (symbol_scope &scope, const token &tok)
 
 ~tree_identifier ()=default
 
void accept (tree_walker &tw)
 
filepos beg_pos () const
 
tree_identifierdup (symbol_scope &scope) const
 
filepos end_pos () 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
 
comment_list leading_comments () const
 
octave_lvalue lvalue (tree_evaluator &tw)
 
bool lvalue_ok () const
 
void mark_as_formal_parameter ()
 
tree_identifiermark_get_set (const token &get_set_tok, const token &dot_tok)
 
std::string name () const
 
void static_workspace_error ()
 
symbol_record symbol () const
 
- Public Member Functions inherited from tree_expression
 tree_expression ()
 
virtual ~tree_expression ()=default
 
virtual void copy_base (const tree_expression &e)
 
size_t delim_count () const
 
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_delims (const token &open_delim, const token &close_delim)
 
virtual std::string oper () const
 
virtual std::string original_text () 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 ()
 
virtual ~tree ()=default
 
const std::string bp_cond () const
 
virtual int column () const
 
virtual void delete_breakpoint ()
 
bool is_active_breakpoint (tree_evaluator &tw) const
 
bool is_breakpoint () const
 
virtual int line () const
 
bool meets_bp_condition (tree_evaluator &tw) const
 
virtual void set_breakpoint (const std::string &condition)
 
std::string str_print_code ()
 

Protected Member Functions

 tree_identifier (symbol_record &sym, const token &tok)
 

Protected Attributes

token m_dot_tok
 
token m_get_set_tok
 
symbol_record m_sym
 
token m_token
 
- Protected Attributes inherited from tree_expression
tree_delimiter_list m_delims
 
bool m_for_cmd_expr
 
char m_postfix_index_type
 
bool m_print_flag
 

Friends

class tree_index_expression
 

Detailed Description

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

Constructor & Destructor Documentation

◆ tree_identifier() [1/3]

tree_identifier::tree_identifier ( const token tok)
inline

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

◆ tree_identifier() [2/3]

tree_identifier::tree_identifier ( symbol_scope scope,
const token tok 
)
inline

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

◆ ~tree_identifier()

tree_identifier::~tree_identifier ( )
default

◆ tree_identifier() [3/3]

tree_identifier::tree_identifier ( symbol_record sym,
const token tok 
)
inlineprotected

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

Member Function Documentation

◆ accept()

◆ beg_pos()

filepos tree_identifier::beg_pos ( ) const
inlinevirtual

Implements tree.

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

References token::beg_pos(), and m_token.

Referenced by tree_classdef_attribute::beg_pos(), and tree_decl_elt::beg_pos().

◆ dup()

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

Implements tree_expression.

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

References tree_expression::copy_base(), symbol_scope::find_symbol(), m_token, and name().

Referenced by tree_decl_elt::dup().

◆ end_pos()

filepos tree_identifier::end_pos ( ) const
inlinevirtual

Implements tree.

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

References token::end_pos(), and m_token.

Referenced by tree_classdef_attribute::end_pos(), and tree_decl_elt::end_pos().

◆ 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 99 of file pt-id.h.

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

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 78 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 69 of file pt-id.h.

◆ leading_comments()

comment_list tree_identifier::leading_comments ( ) const
inlinevirtual

Reimplemented from tree.

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

References token::leading_comments(), and m_token.

◆ lvalue()

◆ lvalue_ok()

bool tree_identifier::lvalue_ok ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 85 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 80 of file pt-id.h.

References m_sym, and symbol_record::mark_formal().

Referenced by tree_decl_elt::mark_as_formal_parameter().

◆ mark_get_set()

tree_identifier * tree_identifier::mark_get_set ( const token get_set_tok,
const token dot_tok 
)
inline

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

References m_dot_tok, and m_get_set_tok.

◆ name()

◆ static_workspace_error()

void tree_identifier::static_workspace_error ( )
inline

Definition at line 91 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 Symbol Documentation

◆ tree_index_expression

friend class tree_index_expression
friend

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

Member Data Documentation

◆ m_dot_tok

token tree_identifier::m_dot_tok
protected

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

Referenced by mark_get_set().

◆ m_get_set_tok

token tree_identifier::m_get_set_tok
protected

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

Referenced by mark_get_set().

◆ m_sym

symbol_record tree_identifier::m_sym
protected

◆ m_token

token tree_identifier::m_token
protected

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

Referenced by beg_pos(), tree_black_hole::dup(), dup(), end_pos(), and leading_comments().


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