Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122import type { LanguageAdapter } from '../types';import { declarationSymbols } from './shared';
const kinds = new Map([ ['function_item', 'function'], ['struct_item', 'struct'], ['enum_item', 'enum'], ['trait_item', 'trait'], ['type_item', 'type'], ['const_item', 'constant'], ['static_item', 'static'], ['impl_item', 'impl'],]);const nestedKinds = new Map([['function_item', 'method']]);const containers = new Set(['impl_item', 'trait_item']);
export const rustAdapter: LanguageAdapter = { extensions: ['.rs'], grammarName: 'rust', symbols: (node, source) => declarationSymbols(node, source, kinds, nestedKinds, containers),};