jak-project/goalc/compiler/Lambda.h

24 lines
494 B
C
Raw Normal View History

#pragma once
#include "common/goos/Object.h"
#include "common/type_system/TypeSpec.h"
// 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; // todo intern
TypeSpec type;
};
2020-09-05 18:55:07 -04:00
struct Lambda {
std::string debug_name;
std::vector<GoalArg> params;
goos::Object body;
2020-09-05 18:55:07 -04:00
};
struct InlineableFunction {
Lambda lambda;
TypeSpec type;
bool inline_by_default = false;
};