valeri/src/stdlib.hpp

27 lines
475 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,
Get,
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);