valeri/src/stdlib.hpp

29 lines
494 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,
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);