Read the input filename from the command line
This commit is contained in:
@ -637,11 +637,11 @@ namespace boot
|
||||
class block : public node
|
||||
{
|
||||
public:
|
||||
std::vector<definition *> value_definitions;
|
||||
std::vector<variable_declaration *> variables;
|
||||
std::vector<constant_definition *> constants;
|
||||
std::vector<statement *> body;
|
||||
|
||||
block(const struct position position, std::vector<definition *>&& value_definitions,
|
||||
std::vector<statement *>&& body);
|
||||
block(const struct position position);
|
||||
virtual void accept(parser_visitor *visitor) override;
|
||||
|
||||
virtual ~block() override;
|
||||
@ -652,8 +652,7 @@ namespace boot
|
||||
public:
|
||||
std::vector<definition *> type_definitions;
|
||||
|
||||
program(const struct position position, std::vector<definition *>&& type_definitions,
|
||||
std::vector<definition *>&& value_definitions, std::vector<statement *>&& body);
|
||||
program(const struct position position, std::vector<definition *>&& type_definitions);
|
||||
virtual void accept(parser_visitor *visitor) override;
|
||||
|
||||
virtual ~program() override;
|
||||
|
@ -31,12 +31,19 @@ namespace gcc
|
||||
void enter_scope();
|
||||
tree_symbol_mapping leave_scope();
|
||||
|
||||
void build_binary_operation(bool condition, boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right, tree target_type);
|
||||
|
||||
void make_if_branch(boot::conditional_statements& branch, tree goto_endif);
|
||||
|
||||
bool is_integral_type(tree type);
|
||||
bool is_numeric_type(tree type);
|
||||
|
||||
tree build_arithmetic_operation(boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right);
|
||||
tree build_comparison_operation(boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right);
|
||||
tree build_logic_operation(boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right);
|
||||
tree build_equality_operation(boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right);
|
||||
|
||||
public:
|
||||
generic_visitor(std::shared_ptr<boot::symbol_table<tree>> symbol_table);
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "tree.h"
|
||||
#include "tree.h"
|
||||
|
||||
#include "elna/boot/ast.h"
|
||||
#include "elna/boot/symbol.h"
|
||||
|
||||
enum elna_tree_index
|
||||
@ -24,7 +24,6 @@ namespace gcc
|
||||
{
|
||||
void init_ttree();
|
||||
bool is_pointer_type(tree type);
|
||||
bool is_string_type(tree type);
|
||||
|
||||
class tree_chain_base
|
||||
{
|
||||
@ -58,5 +57,11 @@ namespace gcc
|
||||
};
|
||||
|
||||
std::shared_ptr<boot::symbol_table<tree>> builtin_symbol_table();
|
||||
|
||||
tree do_pointer_arithmetic(boot::binary_operator binary_operator, tree left, tree right);
|
||||
tree build_binary_operation(bool condition, boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right, tree target_type);
|
||||
tree build_arithmetic_operation(boot::binary_expression *expression,
|
||||
tree_code operator_code, tree left, tree right);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user