diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:38:48 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 21:53:09 +0800 |
| commit | 26105034da4fcce7ac883c899d781f016559310d (patch) | |
| tree | c459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/prismjs/components/prism-fsharp.js | |
| parent | 2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff) | |
| download | xmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip | |
switch to vuepress
Diffstat (limited to 'node_modules/prismjs/components/prism-fsharp.js')
| -rw-r--r-- | node_modules/prismjs/components/prism-fsharp.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/node_modules/prismjs/components/prism-fsharp.js b/node_modules/prismjs/components/prism-fsharp.js new file mode 100644 index 00000000..3e701e0d --- /dev/null +++ b/node_modules/prismjs/components/prism-fsharp.js @@ -0,0 +1,36 @@ +Prism.languages.fsharp = Prism.languages.extend('clike', { + 'comment': [ + { + pattern: /(^|[^\\])\(\*[\s\S]*?\*\)/, + lookbehind: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true + } + ], + 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/, + 'string': { + pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1)B?/, + greedy: true + }, + 'number': [ + /\b0x[\da-fA-F]+(?:un|lf|LF)?\b/, + /\b0b[01]+(?:y|uy)?\b/, + /(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i, + /\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/ + ] +}); +Prism.languages.insertBefore('fsharp', 'keyword', { + 'preprocessor': { + pattern: /^[^\r\n\S]*#.*/m, + alias: 'property', + inside: { + 'directive': { + pattern: /(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/, + lookbehind: true, + alias: 'keyword' + } + } + } +}); |
