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-09-18 18:53:12 +00:00
|
|
|
Set,
|
2024-09-05 22:22:45 +00:00
|
|
|
SrcLoc,
|
2024-09-10 02:18:00 +00:00
|
|
|
Size,
|
2024-09-15 15:21:58 +00:00
|
|
|
Map,
|
2024-08-24 23:55:11 +00:00
|
|
|
Max,
|
|
|
|
};
|
|
|
|
|
|
|
|
class Value;
|
|
|
|
class Symbol;
|
|
|
|
class Array;
|
2024-09-15 14:39:12 +00:00
|
|
|
class StackFrame;
|
2024-08-24 23:55:11 +00:00
|
|
|
|
|
|
|
Result<const char*> get_stdlib_function_name(StdlibFunctionId fun_id);
|
|
|
|
Result<StdlibFunctionId> get_stdlib_function(const Symbol& name);
|
2024-09-15 14:39:12 +00:00
|
|
|
Result<StackFrame> call_stdlib_function(StdlibFunctionId fun_id,
|
|
|
|
const StackFrame& stack);
|