valeri/src/stdlib.hpp

30 lines
502 B
C++
Raw Normal View History

#pragma once
#include <cstdint>
#include "result.hpp"
enum class StdlibFunctionId : uint64_t {
Unknown,
Print,
PrintLn,
Prn,
Assert,
Dict,
List,
2024-09-01 15:13:28 +00:00
Array,
Get,
SrcLoc,
2024-09-10 02:18:00 +00:00
Size,
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);