Move return_statement to function.hpp
This commit is contained in:
parent
a36ba2610b
commit
46a1031a08
2 changed files with 8 additions and 8 deletions
|
|
@ -28,6 +28,14 @@ namespace pslang::ast
|
||||||
ast::location location;
|
ast::location location;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct return_statement
|
||||||
|
{
|
||||||
|
// can be null, which means "return unit"
|
||||||
|
expression_ptr value;
|
||||||
|
ast::location location;
|
||||||
|
std::size_t level = 0;
|
||||||
|
};
|
||||||
|
|
||||||
struct function_call
|
struct function_call
|
||||||
{
|
{
|
||||||
expression_ptr function;
|
expression_ptr function;
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,6 @@ namespace pslang::ast
|
||||||
ast::location location;
|
ast::location location;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct return_statement
|
|
||||||
{
|
|
||||||
// can be null, which means "return unit"
|
|
||||||
expression_ptr value;
|
|
||||||
ast::location location;
|
|
||||||
std::size_t level = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
using statement_impl = std::variant<
|
using statement_impl = std::variant<
|
||||||
expression_ptr,
|
expression_ptr,
|
||||||
assignment,
|
assignment,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue