Files
Library/node_modules/@shikijs/langs/dist/rust.mjs

6 lines
16 KiB
JavaScript
Raw Normal View History

2026-01-09 23:05:52 -05:00
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Rust\",\"name\":\"rust\",\"patterns\":[{\"begin\":\"(<)(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.brackets.angle.rust\"},\"2\":{\"name\":\"punctuation.brackets.square.rust\"}},\"end\":\">\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.brackets.angle.rust\"}},\"patterns\":[{\"include\":\"#block-comments\"},{\"include\":\"#comments\"},{\"include\":\"#gtypes\"},{\"include\":\"#lvariables\"},{\"include\":\"#lifetimes\"},{\"include\":\"#punctuation\"},{\"include\":\"#types\"}]},{\"captures\":{\"1\":{\"name\":\"keyword.operator.macro.dollar.rust\"},\"3\":{\"name\":\"keyword.other.crate.rust\"},\"4\":{\"name\":\"entity.name.type.metavariable.rust\"},\"6\":{\"name\":\"keyword.operator.key-value.rust\"},\"7\":{\"name\":\"variable.other.metavariable.specifier.rust\"}},\"match\":\"(\\\\$)((crate)|([A-Z]\\\\w*))(\\\\s*(:)\\\\s*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\\\\b)?\",\"name\":\"meta.macro.metavariable.type.rust\",\"patterns\":[{\"include\":\"#keywords\"}]},{\"captures\":{\"1\":{\"name\":\"keyword.operator.macro.dollar.rust\"},\"2\":{\"name\":\"variable.other.metavariable.name.rust\"},\"4\":{\"name\":\"keyword.operator.key-value.rust\"},\"5\":{\"name\":\"variable.other.metavariable.specifier.rust\"}},\"match\":\"(\\\\$)([a-z]\\\\w*)(\\\\s*(:)\\\\s*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\\\\b)?\",\"name\":\"meta.macro.metavariable.rust\",\"patterns\":[{\"include\":\"#keywords\"}]},{\"captures\":{\"1\":{\"name\":\"entity.name.function.macro.rules.rust\"},\"3\":{\"name\":\"entity.name.function.macro.rust\"},\"4\":{\"name\":\"entity.name.type.macro.rust\"},\"5\":{\"name\":\"punctuation.brackets.curly.rust\"}},\"match\":\"\\\\b(macro_rules!)\\\\s+(([0-9_a-z]+)|([A-Z][0-9_a-z]*))\\\\s+(\\\\{)\",\"name\":\"meta.macro.rules.rust\"},{\"captures\":{\"1\":{\"name\":\"storage.type.rust\"},\"2\":{\"name\":\"entity.name.module.rust\"}},\"match\":\"(mod)\\\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][0-9A-Z_a-z]*)\"},{\"begin\":\"\\\\b(extern)\\\\s+(crate)\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.rust\"},\"2\":{\"name\":\"keyword.other.crate.rust\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.semi.rust\"}},\"name\":\"meta.import.rust\",\"patterns\":[{\"include\":\"#block-comments\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#punctuation\"}]},{\"begin\":\"\\\\b(use)\\\\s\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.rust\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.semi.rust\"}},\"name\":\"meta.use.rust\",\"patterns\":[{\"include\":\"#block-comments\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#namespaces\"},{\"include\":\"#punctuation\"},{\"include\":\"#types\"},{\"include\":\"#lvariables\"}]},{\"include\":\"#block-comments\"},{\"include\":\"#comments\"},{\"include\":\"#attributes\"},{\"include\":\"#lvariables\"},{\"include\":\"#constants\"},{\"include\":\"#gtypes\"},{\"include\":\"#functions\"},{\"include\":\"#types\"},{\"include\":\"#keywords\"},{\"include\":\"#lifetimes\"},{\"include\":\"#macros\"},{\"include\":\"#namespaces\"},{\"include\":\"#punctuation\"},{\"include\":\"#strings\"},{\"include\":\"#variables\"}],\"repository\":{\"attributes\":{\"begin\":\"(#)(!?)(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.attribute.rust\"},\"3\":{\"name\":\"punctuation.brackets.attribute.rust\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.brackets.attribute.rust\"}},\"name\":\"meta.attribute.rust\",\"patterns\":[{\"include\":\"#block-comments\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#lifetimes\"},{\"include\":\"#punctuation\"},{\"include\":\"#strings\"},{\"include\":\"#gtypes\"},{\"include\":\"#types\"}]},\"block-comments\":{\"patterns\":[{\"match\":\"/\\\\*\\\\*/\",\"name\":\"comment.block.rust\"},{\"begin\":\"/\\\\*\\\\*\",\"end\":\"\\\\*/\",\"name\":\"comment.block.documentation.rust\",\"pat
export default [
lang
]