2024-08-24 23:55:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
#include "result.hpp"
|
|
|
|
|
|
|
|
enum class StdlibFunctionId : uint64_t {
|
|
|
|
Unknown,
|
|
|
|
Print,
|
|
|
|
PrintLn,
|
|
|
|
Prn,
|
2024-08-27 19:19:47 +00:00
|
|
|
Assert,
|
2024-08-28 20:51:25 +00:00
|
|
|
Dict,
|
2024-08-28 22:57:01 +00:00
|
|
|
List,
|
2024-09-01 15:13:28 +00:00
|
|
|
Array,
|
2024-08-28 22:57:01 +00:00
|
|
|
Get,
|
2024-08-24 23:55:11 +00:00
|
|
|
Max,
|
|
|
|
};
|
|
|
|
|
|
|
|
class Value;
|
|
|
|
class Symbol;
|
|
|
|
class Array;
|
|
|
|
|
|
|
|
Result<const char*> get_stdlib_function_name(StdlibFunctionId fun_id);
|
|
|
|
Result<StdlibFunctionId> get_stdlib_function(const Symbol& name);
|
|
|
|
Result<Value> call_stdlib_function(StdlibFunctionId fun_id,
|
|
|
|
const Array& params);
|