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

9 lines
28 KiB
JavaScript
Raw Normal View History

2026-01-09 23:05:52 -05:00
import markdown from './markdown.mjs'
const lang = Object.freeze(JSON.parse("{\"displayName\":\"F#\",\"name\":\"fsharp\",\"patterns\":[{\"include\":\"#compiler_directives\"},{\"include\":\"#comments\"},{\"include\":\"#constants\"},{\"include\":\"#strings\"},{\"include\":\"#chars\"},{\"include\":\"#double_tick\"},{\"include\":\"#definition\"},{\"include\":\"#abstract_definition\"},{\"include\":\"#attributes\"},{\"include\":\"#modules\"},{\"include\":\"#anonymous_functions\"},{\"include\":\"#du_declaration\"},{\"include\":\"#record_declaration\"},{\"include\":\"#records\"},{\"include\":\"#strp_inlined\"},{\"include\":\"#keywords\"},{\"include\":\"#cexprs\"},{\"include\":\"#text\"}],\"repository\":{\"abstract_definition\":{\"begin\":\"\\\\b(static\\\\s+)?(abstract)\\\\s+(member)?(\\\\s+\\\\[<.*>])?\\\\s*([,.0-9_`[:alpha:]\\\\s]+)(<)?\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.fsharp\"},\"2\":{\"name\":\"keyword.fsharp\"},\"3\":{\"name\":\"keyword.fsharp\"},\"4\":{\"name\":\"support.function.attribute.fsharp\"},\"5\":{\"name\":\"keyword.symbol.fsharp\"}},\"end\":\"\\\\s*(with)\\\\b|=|$\",\"endCaptures\":{\"1\":{\"name\":\"keyword.fsharp\"}},\"name\":\"abstract.definition.fsharp\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#common_declaration\"},{\"captures\":{\"1\":{\"name\":\"keyword.symbol.fsharp\"},\"2\":{\"name\":\"variable.parameter.fsharp\"},\"3\":{\"name\":\"keyword.symbol.fsharp\"},\"4\":{\"name\":\"entity.name.type.fsharp\"}},\"match\":\"(\\\\??)([ '.0-9^_`[:alpha:]]+)\\\\s*(:)((?!with\\\\b)\\\\b([ '.0-9^_`\\\\w]+))?\"},{\"captures\":{\"1\":{\"name\":\"entity.name.type.fsharp\"}},\"comments\":\"Here we need the \\\\w modifier in order to check that the words isn't blacklisted\",\"match\":\"(?!with|get|set\\\\b)\\\\s*(['.0-9^_`\\\\w]+)\"},{\"include\":\"#keywords\"}]},\"anonymous_functions\":{\"patterns\":[{\"begin\":\"\\\\b(fun)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.fsharp\"}},\"end\":\"(->)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.symbol.arrow.fsharp\"}},\"name\":\"function.anonymous\",\"patterns\":[{\"include\":\"#comments\"},{\"begin\":\"(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.symbol.fsharp\"}},\"end\":\"\\\\s*(?=(->))\",\"endCaptures\":{\"1\":{\"name\":\"keyword.symbol.arrow.fsharp\"}},\"patterns\":[{\"include\":\"#member_declaration\"}]},{\"include\":\"#variables\"}]}]},\"anonymous_record_declaration\":{\"begin\":\"(\\\\{\\\\|)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.symbol.fsharp\"}},\"end\":\"(\\\\|})\",\"endCaptures\":{\"1\":{\"name\":\"keyword.symbol.fsharp\"}},\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.symbol.fsharp\"}},\"match\":\"[ '0-9^_`[:alpha:]]+(:)\"},{\"captures\":{\"1\":{\"name\":\"entity.name.type.fsharp\"}},\"match\":\"([ '0-9^_`[:alpha:]]+)\"},{\"include\":\"#anonymous_record_declaration\"},{\"include\":\"#keywords\"}]},\"attributes\":{\"patterns\":[{\"begin\":\"\\\\[<\",\"end\":\">?]\",\"name\":\"support.function.attribute.fsharp\",\"patterns\":[{\"include\":\"$self\"}]}]},\"cexprs\":{\"patterns\":[{\"captures\":{\"0\":{\"name\":\"keyword.fsharp\"}},\"match\":\"\\\\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)(?=\\\\s*\\\\{)\",\"name\":\"cexpr.fsharp\"}]},\"chars\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"string.quoted.single.fsharp\"}},\"match\":\"('\\\\\\\\?.')\",\"name\":\"char.fsharp\"}]},\"comments\":{\"patterns\":[{\"begin\":\"^\\\\s*(\\\\(\\\\*\\\\*(?!\\\\)))((?!\\\\*\\\\)).)*$\",\"beginCaptures\":{\"1\":{\"name\":\"comment.block.fsharp\"}},\"name\":\"comment.block.markdown.fsharp\",\"patterns\":[{\"include\":\"text.html.markdown\"}],\"while\":\"^(?!\\\\s*(\\\\*)+\\\\)\\\\s*$)\",\"whileCaptures\":{\"1\":{\"name\":\"comment.block.fsharp\"}}},{\"begin\":\"(\\\\(\\\\*(?!\\\\)))\",\"beginCaptures\":{\"1\":{\"name\":\"comment.block.fsharp\"}},\"end\":\"(\\\\*+\\\\))\",\"endCaptures\":{\"1\":{\"name\":\"comment.block.fsharp\"}},\"name\":\"comment.block.fsharp\",\"patterns\":[{\"comments\":\"Capture // when inside of (* *) like that the rule which capture comments starting by // is not trigger. See https://github.com/io
export default [
...markdown,
lang
]