34 lines
849 B
C
34 lines
849 B
C
#ifndef FUNCTION_H_
|
|
#define FUNCTION_H_
|
|
|
|
#include "data.h"
|
|
|
|
// Builtins
|
|
|
|
Value *builtin_add(Value *args);
|
|
Value *builtin_sub(Value *args);
|
|
Value *builtin_mul(Value *args);
|
|
Value *builtin_div(Value *args);
|
|
Value *builtin_eq(Value *args);
|
|
Value *builtin_list(Value *args);
|
|
Value *builtin_car(Value *args);
|
|
Value *builtin_cdr(Value *args);
|
|
|
|
// Evaluator
|
|
|
|
Value *eval_list(Value *list, Env *env);
|
|
Value *apply_function(Value *func, Value *args, Env *env);
|
|
Value *eval_expr(Value *expr, Env *env);
|
|
|
|
// Key-mapping
|
|
|
|
KeyBindingTable *extract_keybindings(Value *keymap);
|
|
char *normalize_key_sequence(const char *raw_input);
|
|
bool execute_keybinding(const char *key_sequence);
|
|
void set_active_keymap(const char *keymap_name);
|
|
void combine_keymaps(const char *global_keymap, const char *mode_keymap);
|
|
|
|
bool execute_editor_command(const char *command);
|
|
|
|
#endif
|