summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-gedcom.js
blob: 9819c040f66e255b17ab23082a0219172c131b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Prism.languages.gedcom = {
  'line-value': {
    // Preceded by level, optional pointer, and tag
    pattern:
      /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
    lookbehind: true,
    inside: {
      pointer: {
        pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
        alias: 'variable',
      },
    },
  },
  tag: {
    // Preceded by level and optional pointer
    pattern:
      /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
    lookbehind: true,
    alias: 'string',
  },
  level: {
    pattern: /(^[\t ]*)\d+/m,
    lookbehind: true,
    alias: 'number',
  },
  pointer: {
    pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
    alias: 'variable',
  },
};
p">, alias: 'punctuation', }, }, }, keyword: /\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: { pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/, lookbehind: !0, }, continuation: { pattern: /([\r\n])>/, lookbehind: !0, alias: 'punctuation' }, operator: /->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./, punctuation: /[()[\]{},;.:]/, }), (Prism.languages.gap.shell.inside.gap.inside = Prism.languages.gap);