[][src]Macro lark_intern::intern_tables

macro_rules! intern_tables {
    (
        $v:vis struct $InternTables:ident {
            struct $InternTablesData:ident {
                $(
                    $field:ident : map($key:ty, $data:ty),
                )*
            }
        }
    ) => { ... };
}

Generate a "intern tables" struct that can intern one or more types. Input looks like:

This example is not tested
struct MyTables {
    struct MyTablesData {
        field1: map(Key1, Value1),
        field2: map(Key2, Value2),
        ...
        fieldN: map(KeyN, ValueN),
    }
}

This will generate the MyTables struct which will (internally) hold a arc to a MyTablesData which has N interners. It will also generate Intern and Untern impls for each Key/Value type.