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

#include "pt-stmt.h"

Inheritance diagram for tree_statement:
Collaboration diagram for tree_statement:

Public Member Functions

 tree_statement (const tree_statement &)=delete
 
 tree_statement (tree_command *c, comment_list *cl)
 
 tree_statement (tree_expression *e, comment_list *cl)
 
 tree_statement (void)
 
 ~tree_statement (void)
 
void accept (tree_walker &tw)
 
std::string bp_cond () const
 
void column (int c)
 
int column (void) const
 
tree_commandcommand (void)
 
comment_listcomment_text (void)
 
void delete_breakpoint (void)
 
void echo_code (const std::string &prefix)
 
tree_expressionexpression (void)
 
bool is_active_breakpoint (tree_evaluator &tw) const
 
bool is_breakpoint (void) const
 
bool is_command (void) const
 
bool is_end_of_fcn_or_script (void) const
 
bool is_end_of_file (void) const
 
bool is_expression (void) const
 
bool is_null_statement (void) const
 
void line (int l)
 
int line (void) const
 
bool meets_bp_condition (tree_evaluator &tw) const
 
tree_statementoperator= (const tree_statement &)=delete
 
bool print_result (void)
 
void set_breakpoint (const std::string &condition)
 
void set_command (tree_command *c)
 
void set_expression (tree_expression *e)
 
void set_location (int l, int c)
 
void set_print_flag (bool print_flag)
 
std::string str_print_code (void)
 

Private Attributes

std::string * m_bp_cond
 
int m_column_num
 
tree_commandm_command
 
comment_listm_comment_list
 
tree_expressionm_expression
 
int m_line_num
 

Detailed Description

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

Constructor & Destructor Documentation

◆ tree_statement() [1/4]

tree_statement::tree_statement ( void  )
inline

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

◆ tree_statement() [2/4]

tree_statement::tree_statement ( tree_command c,
comment_list cl 
)
inline

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

◆ tree_statement() [3/4]

tree_statement::tree_statement ( tree_expression e,
comment_list cl 
)
inline

Definition at line 63 of file pt-stmt.h.

◆ tree_statement() [4/4]

tree_statement::tree_statement ( const tree_statement )
delete

◆ ~tree_statement()

tree_statement::~tree_statement ( void  )

Definition at line 56 of file pt-stmt.cc.

Member Function Documentation

◆ accept()

void tree_statement::accept ( tree_walker tw)
inlinevirtual

◆ bp_cond()

std::string tree_statement::bp_cond ( void  ) const

Definition at line 111 of file pt-stmt.cc.

References tree::bp_cond(), m_command, and m_expression.

Referenced by tree_breakpoint::take_action().

◆ column() [1/2]

void tree::column ( int  c)
inlineinherited

Definition at line 66 of file pt.h.

References tree::m_column_num.

◆ column() [2/2]

int tree_statement::column ( void  ) const
virtual

◆ command()

◆ comment_text()

comment_list* tree_statement::comment_text ( void  )
inline

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

References m_comment_list.

Referenced by tree_print_code::visit_statement().

◆ delete_breakpoint()

void tree_statement::delete_breakpoint ( void  )
virtual

Reimplemented from tree.

Definition at line 86 of file pt-stmt.cc.

References tree::delete_breakpoint(), m_command, and m_expression.

Referenced by tree_breakpoint::take_action().

◆ echo_code()

void tree_statement::echo_code ( const std::string &  prefix)

Definition at line 144 of file pt-stmt.cc.

References accept(), and octave_stdout.

◆ expression()

◆ is_active_breakpoint()

bool tree_statement::is_active_breakpoint ( tree_evaluator tw) const

Definition at line 103 of file pt-stmt.cc.

References tree::is_active_breakpoint(), m_command, and m_expression.

Referenced by tree_evaluator::do_breakpoint().

◆ is_breakpoint()

bool tree_statement::is_breakpoint ( void  ) const

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

References tree::is_breakpoint(), m_command, and m_expression.

Referenced by tree_breakpoint::take_action().

◆ is_command()

bool tree_statement::is_command ( void  ) const
inline

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

References m_command.

Referenced by tree_breakpoint::visit_statement().

◆ is_end_of_fcn_or_script()

bool tree_statement::is_end_of_fcn_or_script ( void  ) const

Definition at line 152 of file pt-stmt.cc.

References tree_no_op_command::is_end_of_fcn_or_script(), and m_command.

Referenced by tree_evaluator::do_breakpoint().

◆ is_end_of_file()

bool tree_statement::is_end_of_file ( void  ) const

Definition at line 169 of file pt-stmt.cc.

References tree_no_op_command::is_end_of_file(), and m_command.

◆ is_expression()

bool tree_statement::is_expression ( void  ) const
inline

◆ is_null_statement()

bool tree_statement::is_null_statement ( void  ) const
inline

Definition at line 105 of file pt-stmt.h.

References m_command, m_comment_list, and m_expression.

Referenced by base_parser::set_stmt_print_flag().

◆ line() [1/2]

void tree::line ( int  l)
inlineinherited

Definition at line 64 of file pt.h.

References tree::m_line_num.

◆ line() [2/2]

◆ meets_bp_condition()

bool tree::meets_bp_condition ( tree_evaluator tw) const
inherited

◆ operator=()

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

◆ print_result()

bool tree_statement::print_result ( void  )

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

References m_expression, and tree_expression::print_result().

Referenced by tree_print_code::visit_statement().

◆ set_breakpoint()

void tree_statement::set_breakpoint ( const std::string &  condition)
virtual

Reimplemented from tree.

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

References m_command, m_expression, and tree::set_breakpoint().

Referenced by tree_breakpoint::take_action().

◆ set_command()

void tree_statement::set_command ( tree_command c)
inline

Definition at line 118 of file pt-stmt.h.

References m_command.

◆ set_expression()

void tree_statement::set_expression ( tree_expression e)
inline

Definition at line 120 of file pt-stmt.h.

References m_expression.

Referenced by base_parser::make_try_command().

◆ set_location()

void tree_statement::set_location ( int  l,
int  c 
)

Definition at line 135 of file pt-stmt.cc.

References m_command, m_expression, and tree::set_location().

◆ set_print_flag()

void tree_statement::set_print_flag ( bool  print_flag)

Definition at line 64 of file pt-stmt.cc.

References m_expression, and tree_expression::set_print_flag().

Referenced by base_parser::set_stmt_print_flag().

◆ str_print_code()

std::string tree::str_print_code ( void  )
inherited

Definition at line 46 of file pt.cc.

References tree::accept().

Referenced by tree_argument_list::get_arg_names().

Member Data Documentation

◆ m_bp_cond

std::string* tree::m_bp_cond
privateinherited

◆ m_column_num

int tree::m_column_num
privateinherited

Definition at line 120 of file pt.h.

Referenced by tree::column(), and tree::set_location().

◆ m_command

◆ m_comment_list

comment_list* tree_statement::m_comment_list
private

Definition at line 138 of file pt-stmt.h.

Referenced by comment_text(), and is_null_statement().

◆ m_expression

◆ m_line_num

int tree::m_line_num
privateinherited

Definition at line 119 of file pt.h.

Referenced by tree::line(), and tree::set_location().


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