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::code Class Reference

#include <chomik.h>

Public Member Functions

 code (list_of_statements *const l)
 
 code ()
 
 code (const code &c)
 
void execute (machine &m, std::shared_ptr< basic_generator > father=nullptr) const
 
void add_statement (std::shared_ptr< statement > &&s)
 
void set_is_main (bool m)
 
const list_of_statementsget_body () const
 
void report (std::ostream &s) const
 
void add_placeholders_to_generator (basic_generator &g) const
 
void get_actual_code_value (const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
 
void add_content_to_signature (const generic_name_item &s, signature &target, const machine &m, const basic_generator &g) const
 
std::string get_actual_text_representation (const machine &m, const basic_generator &g) const
 
void get_result_replacing_placeholders (const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const
 
bool operator== (const code &c) const
 

Detailed Description

This class contains a list of statements, it represents a code and can be executed. It is used as a built-in type code to represent its values.

Constructor & Destructor Documentation

◆ code() [1/3]

chomik::code::code ( list_of_statements *const l)
inline

The parameter should be destroyed by the parser!

◆ code() [2/3]

chomik::code::code ( )
inline

◆ code() [3/3]

chomik::code::code ( const code & c)

Member Function Documentation

◆ add_content_to_signature()

void chomik::code::add_content_to_signature ( const generic_name_item & s,
signature & target,
const machine & m,
const basic_generator & g ) const

◆ add_placeholders_to_generator()

void chomik::code::add_placeholders_to_generator ( basic_generator & g) const

◆ add_statement()

void chomik::code::add_statement ( std::shared_ptr< statement > && s)
inline

◆ execute()

void chomik::code::execute ( machine & m,
std::shared_ptr< basic_generator > father = nullptr ) const

◆ get_actual_code_value()

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

◆ get_actual_text_representation()

std::string chomik::code::get_actual_text_representation ( const machine & m,
const basic_generator & g ) const

◆ get_body()

const list_of_statements & chomik::code::get_body ( ) const
inline

◆ get_result_replacing_placeholders()

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

◆ operator==()

bool chomik::code::operator== ( const code & c) const

◆ report()

void chomik::code::report ( std::ostream & s) const

◆ set_is_main()

void chomik::code::set_is_main ( bool m)
inline

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

copyright by Pawel Biernacki

Vantaa 2022