chomik 0.2.1
experimental and minimalistic programming language

My name is Pawel Biernacki.
I am a software engineer.
This site is my hobby project.

Loading...
Searching...
No Matches
chomik::statement Class Referenceabstract

#include <chomik.h>

Inheritance diagram for chomik::statement:
Collaboration diagram for chomik::statement:

Public Types

enum class  statement_type {
  NONE , TYPE_DEFINITION , VARIABLE_DEFINITION , ASSIGNMENT ,
  EXECUTE , EXPAND
}
 

Public Member Functions

 statement (unsigned l)
 
virtual ~statement ()
 
virtual statement_type get_statement_type () const =0
 
virtual void report (std::ostream &s) const =0
 
virtual void execute (machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const =0
 
virtual void expand (machine &m, int depth) const
 
virtual void add_placeholders_to_generator (basic_generator &g) const =0
 
void get_actual_code_value (const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
 
virtual bool get_is_code_assignment (machine &m) const
 
virtual void make_copy_with_replacements (const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &s) const =0
 
virtual void get_copy (std::shared_ptr< statement > &target) const =0
 
virtual const std::vector< std::shared_ptr< type_definition > > & get_vector_of_type_definitions () const
 

Protected Attributes

unsigned line_number
 

Static Protected Attributes

static const std::vector< std::shared_ptr< type_definition > > dummy
 

Detailed Description

This class is a base class for all statements in the chomik programming language.

Member Enumeration Documentation

◆ statement_type

Enumerator
NONE 
TYPE_DEFINITION 
VARIABLE_DEFINITION 
ASSIGNMENT 
EXECUTE 
EXPAND 

Constructor & Destructor Documentation

◆ statement()

chomik::statement::statement ( unsigned l)
inline

◆ ~statement()

virtual chomik::statement::~statement ( )
inlinevirtual

Member Function Documentation

◆ add_placeholders_to_generator()

◆ execute()

virtual void chomik::statement::execute ( machine & m,
std::shared_ptr< const statement > && i,
std::shared_ptr< basic_generator > father = nullptr ) const
pure virtual

◆ expand()

virtual void chomik::statement::expand ( machine & m,
int depth ) const
inlinevirtual

◆ get_actual_code_value()

void chomik::statement::get_actual_code_value ( const machine & m,
const basic_generator & g,
const replacing_policy & p,
code & target ) const

◆ get_copy()

◆ get_is_code_assignment()

virtual bool chomik::statement::get_is_code_assignment ( machine & m) const
inlinevirtual

Reimplemented in chomik::assignment_statement.

◆ get_statement_type()

◆ get_vector_of_type_definitions()

virtual const std::vector< std::shared_ptr< type_definition > > & chomik::statement::get_vector_of_type_definitions ( ) const
inlinevirtual

◆ make_copy_with_replacements()

virtual void chomik::statement::make_copy_with_replacements ( const machine & m,
const basic_generator & g,
const replacing_policy & p,
std::shared_ptr< statement > & s ) const
pure virtual

◆ report()

Member Data Documentation

◆ dummy

const std::vector<std::shared_ptr<type_definition> > chomik::statement::dummy
staticprotected

◆ line_number

unsigned chomik::statement::line_number
protected

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

copyright by Pawel Biernacki

Vantaa 2022