pub fn generate(
    doc: &Document,
    names: &Names,
    settings: &CodegenSettings
) -> TokenStream