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

6 lines
16 KiB
JavaScript
Raw Normal View History

2025-07-26 16:40:29 +08: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][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?\",\"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][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?\",\"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+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\\\\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][A-Za-z0-9_]*)\"},{\"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\",\"patterns\":[{\"include\":\"#block-comments\"}]},{\"begin\":\"/\
export default [
lang
]