Prism.languages.hcl = { comment: /(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/, heredoc: { pattern: /<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m, greedy: true, alias: 'string', }, keyword: [ { pattern: /(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i, inside: { type: { pattern: /(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i, lookbehind: true, alias: 'variable', }, }, }, { pattern: /(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i, inside: { type: { pattern: /(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i, lookbehind: true, alias: 'variable', }, }, }, /[\w-]+(?=\s+\{)/, ], property: [/[-\w\.]+(?=\s*=(?!=))/, /"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/], string: { pattern: /"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/, greedy: true, inside: { interpolation: { pattern: /(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/, lookbehind: true, inside: { type: { pattern: /(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i, lookbehind: true, alias: 'variable', }, keyword: /\b(?:count|data|local|module|path|self|terraform|var)\b/i, function: /\w+(?=\()/, string: { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: true, }, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i, punctuation: /[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/, }, }, }, }, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i, boolean: /\b(?:false|true)\b/i, punctuation: /[=\[\]{}]/, }; 6285968eff9e7b21f'>diffstats
path: root/public/prism/prism-idris.min.js
blob: 98bac8e85d42d31e7ce74fb17d064eb3d0f06a72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(Prism.languages.idris = Prism.languages.extend('haskell', {
  comment: { pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m },
  keyword:
    /\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,
  builtin: void 0,
})),
  Prism.languages.insertBefore('idris', 'keyword', {
    'import-statement': {
      pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,
      lookbehind: !0,
      inside: { punctuation: /\./ },
    },
  }),
  (Prism.languages.idr = Prism.languages.idris);