Files
docs/node_modules/@shikijs/langs/dist/crystal.mjs

19 lines
32 KiB
JavaScript
Raw Normal View History

2025-08-27 14:05:33 +08:00
import html from './html.mjs'
import sql from './sql.mjs'
import css from './css.mjs'
import c from './c.mjs'
import javascript from './javascript.mjs'
import shellscript from './shellscript.mjs'
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Crystal\",\"fileTypes\":[\"cr\"],\"firstLineMatch\":\"^#!/.*\\\\bcrystal\",\"foldingStartMarker\":\"^(\\\\s*+(annotation|module|class|struct|union|enum|def(?!.*\\\\bend\\\\s*$)|unless|if|case|begin|for|while|until|^=begin|(\\\"(\\\\\\\\.|[^\\\"])*+\\\"|'(\\\\\\\\.|[^'])*+'|[^#\\\"'])*(\\\\s(do|begin|case)|(?<!\\\\$)[-+=&|*/~%^<>~]\\\\s*+(if|unless)))\\\\b(?![^;]*+;.*?\\\\bend\\\\b)|(\\\"(\\\\\\\\.|[^\\\"])*+\\\"|'(\\\\\\\\.|[^'])*+'|[^#\\\"'])*(\\\\{(?![^}]*+\\\\})|\\\\[(?![^\\\\]]*+\\\\]))).*$|[#].*?\\\\(fold\\\\)\\\\s*+$\",\"foldingStopMarker\":\"((^|;)\\\\s*+end\\\\s*+([#].*)?$|(^|;)\\\\s*+end\\\\..*$|^\\\\s*+[}\\\\]],?\\\\s*+([#].*)?$|[#].*?\\\\(end\\\\)\\\\s*+$|^=end)\",\"name\":\"crystal\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.class.crystal\"},\"2\":{\"name\":\"keyword.control.class.crystal\"},\"3\":{\"name\":\"entity.name.type.class.crystal\"},\"5\":{\"name\":\"punctuation.separator.crystal\"},\"6\":{\"name\":\"support.class.other.type-param.crystal\"},\"7\":{\"name\":\"entity.other.inherited-class.crystal\"},\"8\":{\"name\":\"punctuation.separator.crystal\"},\"9\":{\"name\":\"punctuation.separator.crystal\"},\"10\":{\"name\":\"support.class.other.type-param.crystal\"},\"11\":{\"name\":\"punctuation.definition.variable.crystal\"}},\"match\":\"^\\\\s*(abstract)?\\\\s*(class|struct|union|annotation|enum)\\\\s+(([.A-Z_:\\\\x{80}-\\\\x{10FFFF}][.\\\\w:\\\\x{80}-\\\\x{10FFFF}]*(\\\\(([,\\\\s.a-zA-Z0-9_:\\\\x{80}-\\\\x{10FFFF}]+)\\\\))?(\\\\s*(<)\\\\s*[.:A-Z\\\\x{80}-\\\\x{10FFFF}][.:\\\\w\\\\x{80}-\\\\x{10FFFF}]*(\\\\(([.a-zA-Z0-9_:]+\\\\s,)\\\\))?)?)|((<<)\\\\s*[.A-Z0-9_:\\\\x{80}-\\\\x{10FFFF}]+))\",\"name\":\"meta.class.crystal\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.module.crystal\"},\"2\":{\"name\":\"entity.name.type.module.crystal\"},\"3\":{\"name\":\"entity.other.inherited-class.module.first.crystal\"},\"4\":{\"name\":\"punctuation.separator.inheritance.crystal\"},\"5\":{\"name\":\"entity.other.inherited-class.module.second.crystal\"},\"6\":{\"name\":\"punctuation.separator.inheritance.crystal\"},\"7\":{\"name\":\"entity.other.inherited-class.module.third.crystal\"},\"8\":{\"name\":\"punctuation.separator.inheritance.crystal\"}},\"match\":\"^\\\\s*(module)\\\\s+(([A-Z\\\\x{80}-\\\\x{10FFFF}][\\\\w\\\\x{80}-\\\\x{10FFFF}]*(::))?([A-Z\\\\x{80}-\\\\x{10FFFF}][\\\\w\\\\x{80}-\\\\x{10FFFF}]*(::))?([A-Z\\\\x{80}-\\\\x{10FFFF}][\\\\w\\\\x{80}-\\\\x{10FFFF}]*(::))*[A-Z\\\\x{80}-\\\\x{10FFFF}][\\\\w\\\\x{80}-\\\\x{10FFFF}]*)\",\"name\":\"meta.module.crystal\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.lib.crystal\"},\"2\":{\"name\":\"entity.name.type.lib.crystal\"},\"3\":{\"name\":\"entity.other.inherited-class.lib.first.crystal\"},\"4\":{\"name\":\"punctuation.separator.inheritance.crystal\"},\"5\":{\"name\":\"entity.other.inherited-class.lib.second.crystal\"},\"6\":{\"name\":\"punctuation.separator.inheritance.crystal\"},\"7\":{\"name\":\"entity.other.inherited-class.lib.third.crystal\"},\"8\":{\"name\":\"punctuation.separator.inheritance.crystal\"}},\"match\":\"^\\\\s*(lib)\\\\s+(([A-Z]\\\\w*(::))?([A-Z]\\\\w*(::))?([A-Z]\\\\w*(::))*[A-Z]\\\\w*)\",\"name\":\"meta.lib.crystal\"},{\"captures\":{\"1\":{\"name\":\"keyword.control.lib.type.crystal\"},\"2\":{\"name\":\"entity.name.lib.type.crystal\"},\"3\":{\"name\":\"keyword.control.lib.crystal\"},\"4\":{\"name\":\"entity.name.lib.type.value.crystal\"}},\"match\":\"(?<!\\\\.)\\\\b(type)\\\\s+([A-Z]\\\\w+)\\\\s*(=)\\\\s*(.+)\",\"name\":\"meta.lib.type.crystal\"},{\"match\":\"(?<!\\\\.)\\\\b(fun|begin|case|class|else|elsif|end|ensure|enum|for|if|macro|module|rescue|struct|then|union|unless|until|when|while)\\\\b(?![?!:])\",\"name\":\"keyword.control.crystal\"},{\"match\":\"(?<!\\\\.)\\\\b(abstract|alias|asm|break|extend|in|include|next|of|private|protected|struct|return|select|super|with|yield)\\\\b(?![?!:])\",\"name\":\"keyword.control.primary.crystal\"},{\"match\":\"(?<!\\\\.)\\\\b(describe|context|it|expect_raises)\\\\b(?![?!:])\",\"name\":\"keyword.control.crystal\"},{\
export default [
...html,
...sql,
...css,
...c,
...javascript,
...shellscript,
lang
]