|
@ -214,6 +214,7 @@ namespace molasses { |
|
|
std::vector<std::string> operator>>(std::vector<std::string> current_stack, const operation& next_op); |
|
|
std::vector<std::string> operator>>(std::vector<std::string> current_stack, const operation& next_op); |
|
|
|
|
|
|
|
|
std::optional<int32_t> try_parse_int32(const std::string& str); |
|
|
std::optional<int32_t> try_parse_int32(const std::string& str); |
|
|
|
|
|
std::optional<int64_t> try_parse_int64(const std::string& str); |
|
|
|
|
|
|
|
|
struct parser_context { |
|
|
struct parser_context { |
|
|
std::vector<std::shared_ptr<type>> types; |
|
|
std::vector<std::shared_ptr<type>> types; |
|
@ -229,7 +230,11 @@ namespace molasses { |
|
|
parser_context parser; |
|
|
parser_context parser; |
|
|
std::vector<std::shared_ptr<procedure_operation>> procedures; |
|
|
std::vector<std::shared_ptr<procedure_operation>> procedures; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using success_t = bool; |
|
|
|
|
|
|
|
|
|
|
|
std::tuple<interpreter_stack, generate_context, std::optional<std::shared_ptr<std::runtime_error>>> interpret(interpreter_stack, generate_context, std::string ); |
|
|
|
|
|
|
|
|
generate_context parse(parser_context, const lexed_output&); |
|
|
generate_context parse(parser_context, const lexed_output&); |
|
|
std::vector<std::string> generate(const generate_context&); |
|
|
std::vector<std::string> generate(const generate_context&); |
|
|
|
|
|
|
|
|