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

#include "pt-idx.h"

Inheritance diagram for tree_index_expression:
tree_expression tree

Public Member Functions

 tree_index_expression (tree_expression *e, const std::string &n, int l=-1, int c=-1)
 
 tree_index_expression (tree_expression *e, tree_expression *df, int l=-1, int c=-1)
 
 tree_index_expression (tree_expression *e=nullptr, tree_argument_list *lst=nullptr, int l=-1, int c=-1, char t='(')
 
 ~tree_index_expression ()
 
void accept (tree_walker &tw)
 
tree_index_expressionappend (const std::string &n)
 
tree_index_expressionappend (tree_argument_list *lst=nullptr, char t='(')
 
tree_index_expressionappend (tree_expression *df)
 
std::list< tree_argument_list * > arg_lists ()
 
std::list< string_vectorarg_names ()
 
tree_index_expressiondup (symbol_scope &scope) const
 
std::list< tree_expression * > dyn_fields ()
 
octave_value evaluate (tree_evaluator &tw, int nargout=1)
 
octave_value_list evaluate_n (tree_evaluator &tw, int nargout=1)
 
tree_expressionexpression ()
 
std::string get_struct_index (tree_evaluator &tw, std::list< string_vector >::const_iterator p_arg_nm, std::list< tree_expression * >::const_iterator p_dyn_field) const
 
bool is_index_expression () const
 
bool is_word_list_cmd () const
 
octave_lvalue lvalue (tree_evaluator &tw)
 
bool lvalue_ok () const
 
void mark_word_list_cmd ()
 
std::string name () const
 
bool rvalue_ok () const
 
std::string type_tags ()
 
- 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_identifier () 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
 
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 ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 51 of file pt-idx.h.

Constructor & Destructor Documentation

◆ tree_index_expression() [1/3]

tree_index_expression::tree_index_expression ( tree_expression e = nullptr,
tree_argument_list lst = nullptr,
int  l = -1,
int  c = -1,
char  t = '(' 
)

Definition at line 53 of file pt-idx.cc.

References append().

Referenced by dup().

◆ tree_index_expression() [2/3]

tree_index_expression::tree_index_expression ( tree_expression e,
const std::string &  n,
int  l = -1,
int  c = -1 
)

Definition at line 62 of file pt-idx.cc.

References append(), and n.

◆ tree_index_expression() [3/3]

tree_index_expression::tree_index_expression ( tree_expression e,
tree_expression df,
int  l = -1,
int  c = -1 
)

Definition at line 71 of file pt-idx.cc.

References append().

◆ ~tree_index_expression()

tree_index_expression::~tree_index_expression ( )

Definition at line 116 of file pt-idx.cc.

Member Function Documentation

◆ accept()

void tree_index_expression::accept ( tree_walker tw)
inlinevirtual

Implements tree.

Definition at line 111 of file pt-idx.h.

References tree_walker::visit_index_expression().

◆ append() [1/3]

tree_index_expression * tree_index_expression::append ( const std::string &  n)

Definition at line 95 of file pt-idx.cc.

References n.

◆ append() [2/3]

tree_index_expression * tree_index_expression::append ( tree_argument_list lst = nullptr,
char  t = '(' 
)

◆ append() [3/3]

tree_index_expression * tree_index_expression::append ( tree_expression df)

Definition at line 106 of file pt-idx.cc.

◆ arg_lists()

std::list<tree_argument_list *> tree_index_expression::arg_lists ( )
inline

◆ arg_names()

std::list<string_vector> tree_index_expression::arg_names ( )
inline

◆ dup()

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

◆ dyn_fields()

std::list<tree_expression *> tree_index_expression::dyn_fields ( )
inline

◆ evaluate()

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

Implements tree_expression.

Definition at line 102 of file pt-idx.h.

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

◆ evaluate_n()

◆ expression()

tree_expression* tree_index_expression::expression ( )
inline

◆ get_struct_index()

std::string tree_index_expression::get_struct_index ( tree_evaluator tw,
std::list< string_vector >::const_iterator  p_arg_nm,
std::list< tree_expression * >::const_iterator  p_dyn_field 
) const

Definition at line 145 of file pt-idx.cc.

References tree_expression::evaluate(), panic_impossible, and octave_value::xstring_value().

Referenced by evaluate_n(), and lvalue().

◆ is_index_expression()

bool tree_index_expression::is_index_expression ( ) const
inlinevirtual

Reimplemented from tree_expression.

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

◆ is_word_list_cmd()

bool tree_index_expression::is_word_list_cmd ( ) const
inline

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

Referenced by evaluate_n().

◆ lvalue()

◆ lvalue_ok()

bool tree_index_expression::lvalue_ok ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 94 of file pt-idx.h.

References tree_expression::lvalue_ok().

◆ mark_word_list_cmd()

void tree_index_expression::mark_word_list_cmd ( )
inline

Definition at line 90 of file pt-idx.h.

◆ name()

std::string tree_index_expression::name ( ) const
virtual

Reimplemented from tree_expression.

Definition at line 139 of file pt-idx.cc.

References tree_expression::name().

Referenced by tree_argument_list::variable_names().

◆ rvalue_ok()

bool tree_index_expression::rvalue_ok ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 96 of file pt-idx.h.

◆ type_tags()

std::string tree_index_expression::type_tags ( )
inline

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