summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-dns-zone-file.min.js
blob: b6087849c9b982c86a5bc968719a93708902b6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(Prism.languages['dns-zone-file'] = {
  comment: /;.*/,
  string: { pattern: /"(?:\\.|[^"\\\r\n])*"/, greedy: !0 },
  variable: [
    { pattern: /(^\$ORIGIN[ \t]+)\S+/m, lookbehind: !0 },
    { pattern: /(^|\s)@(?=\s|$)/, lookbehind: !0 },
  ],
  keyword: /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,
  class: {
    pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,
    lookbehind: !0,
    alias: 'keyword',
  },
  type: {
    pattern:
      /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,
    lookbehind: !0,
    alias: 'keyword',
  },
  punctuation: /[()]/,
}),
  (Prism.languages['dns-zone'] = Prism.languages['dns-zone-file']);
>/** * Should be found before strings because of '"'"- and '`'`-like sequences. */ char: { pattern: /'(?:\\(?:.|[0Uux][0-9A-Fa-f]{1,6})|[^\n\r'\\])'/, greedy: true, inside: { symbol: escapes, }, }, string: [ { pattern: /`[^`]*`/, greedy: true, }, { pattern: /"(?:\\.|[^\n\r"\\])*"/, greedy: true, inside: { symbol: escapes, }, }, ], directive: { pattern: /#\w+/, alias: 'property', }, number: /\b0(?:b[01_]+|d[\d_]+|h_*(?:(?:(?:[\dA-Fa-f]_*){8}){1,2}|(?:[\dA-Fa-f]_*){4})|o[0-7_]+|x[\dA-F_a-f]+|z[\dAB_ab]+)\b|(?:\b\d+(?:\.(?!\.)\d*)?|\B\.\d+)(?:[Ee][+-]?\d*)?[ijk]?(?!\w)/, discard: { pattern: /\b_\b/, alias: 'keyword', }, 'procedure-definition': { pattern: /\b\w+(?=[ \t]*(?::\s*){2}proc\b)/, alias: 'function', }, keyword: /\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/, /** * false, nil, true can be used as procedure names. "_" and keywords can't. */ 'procedure-name': { pattern: /\b\w+(?=[ \t]*\()/, alias: 'function', }, boolean: /\b(?:false|nil|true)\b/, 'constant-parameter-sign': { pattern: /\$/, alias: 'important', }, undefined: { pattern: /---/, alias: 'operator', }, arrow: { pattern: /->/, alias: 'punctuation', }, operator: /\+\+|--|\.\.[<=]?|(?:&~|[-!*+/=~]|[%&<>|]{1,2})=?|[?^]/, punctuation: /[(),.:;@\[\]{}]/, }; })(Prism);