rune/chartab.rs
1use crate::core::object::{CharTable, CharTableInner, Object, Symbol};
2use rune_macros::defun;
3
4#[defun]
5fn make_char_table<'ob>(_purpose: Symbol<'ob>, init: Option<Object<'ob>>) -> CharTableInner<'ob> {
6 CharTableInner::new(init)
7}
8
9#[defun]
10fn set_char_table_parent<'ob>(
11 table: &'ob CharTable,
12 parent: Option<&'ob CharTable>,
13) -> Option<&'ob CharTable> {
14 table.set_parent(parent);
15 parent
16}