2020-09-13 21:32:55 -04:00
|
|
|
#pragma once
|
|
|
|
|
2020-09-17 21:47:52 -04:00
|
|
|
#include "common/goos/Object.h"
|
2022-06-22 23:37:46 -04:00
|
|
|
#include "common/type_system/TypeSpec.h"
|
2020-09-12 13:11:42 -04:00
|
|
|
|
|
|
|
// note - we cannot easily reuse the GOOS argument system because GOAL's is slightly different.
|
|
|
|
// there's no rest or keyword support.
|
|
|
|
struct GoalArg {
|
|
|
|
std::string name;
|
|
|
|
TypeSpec type;
|
|
|
|
};
|
|
|
|
|
2020-09-05 18:55:07 -04:00
|
|
|
struct Lambda {
|
|
|
|
std::string debug_name;
|
2020-09-12 13:11:42 -04:00
|
|
|
std::vector<GoalArg> params;
|
|
|
|
goos::Object body;
|
2020-09-05 18:55:07 -04:00
|
|
|
};
|
|
|
|
|
2023-02-24 18:32:30 -05:00
|
|
|
struct InlineableFunction {
|
|
|
|
Lambda lambda;
|
|
|
|
TypeSpec type;
|
|
|
|
bool inline_by_default = false;
|
|
|
|
};
|