Bash++
Bash++ compiler internal documentation
Classes | Namespaces | Functions
bpp_codegen.h File Reference
#include <string>
#include <memory>
#include <optional>
#include <deque>
#include <type_traits>
#include "bpp.h"
#include <error/InternalError.h>
#include <AST/ASTNode.h>
Include dependency graph for bpp_codegen.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bpp::code_segment
 A struct to hold (compiled) code segments. More...
 
struct  bpp::entity_reference
 Represents the result of resolving a reference to an entity. More...
 
struct  bpp::entity_reference::reference_error
 

Namespaces

namespace  bpp
 

Functions

code_segment bpp::generate_supershell_code (const std::string &code_to_run, std::shared_ptr< bpp::bpp_program > program)
 Generates a supershell code segment for executing a bash command.
 
code_segment bpp::generate_delete_code (std::shared_ptr< bpp_object > object, const std::string &object_ref, std::shared_ptr< bpp::bpp_program > program)
 
code_segment bpp::generate_constructor_call_code (const std::string &reference_code, std::shared_ptr< bpp_class > assumed_class)
 
code_segment bpp::generate_destructor_call_code (const std::string &reference_code, std::shared_ptr< bpp_class > assumed_class, bool force_static_reference, std::shared_ptr< bpp::bpp_program > program)
 
code_segment bpp::generate_method_call_code (const std::string &reference_code, const std::string &method_name, std::shared_ptr< bpp_class > assumed_class, bool force_static_reference, std::shared_ptr< bpp::bpp_program > program)
 
code_segment bpp::generate_dynamic_cast_code (const std::string &reference_code, const std::string &class_name, std::shared_ptr< bpp::bpp_program > program)
 Generates a code segment for performing a dynamic cast.
 
code_segment bpp::generate_typeof_code (const std::string &reference_code, std::shared_ptr< bpp::bpp_program > program)
 
code_segment bpp::generate_new_code (const std::string &new_address, std::shared_ptr< bpp::bpp_class > new_class, bool inline_new)
 Generate the assignments necessary to create a new object of a given class.
 
std::shared_ptr< bpp::bpp_methodbpp::generate_copy_method (std::shared_ptr< bpp::bpp_class > containing_class, std::shared_ptr< bpp::bpp_program > program)
 Generates a copy method for a class.
 
std::shared_ptr< bpp::bpp_methodbpp::generate_new_method (std::shared_ptr< bpp::bpp_class > containing_class)
 
std::shared_ptr< bpp::bpp_methodbpp::generate_delete_method (std::shared_ptr< bpp::bpp_class > containing_class)
 
std::string bpp::get_encased_ref (const std::string &ref, uint8_t indirection_level)
 Encases a temporary variable reference with the appropriate level of indirection.
 
entity_reference bpp::resolve_reference_impl (const std::string &file, std::shared_ptr< bpp::bpp_entity > context, std::deque< AST::Token< std::string > > *nodes, std::deque< std::string > *identifiers, bool declare_local, std::shared_ptr< bpp::bpp_program > program)
 Resolves a reference to an entity in a particular context.
 
entity_reference bpp::resolve_reference (const std::string &file, std::shared_ptr< bpp::bpp_entity > context, auto identifiers, bool declare_local, std::shared_ptr< bpp::bpp_program > program)