aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-linker-script.js
blob: 3231d531ba7ede8b480786992162de800f24322f (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['linker-script'] = {
  comment: {
    pattern: /(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,
    lookbehind: true,
    greedy: true,
  },
  identifier: {
    pattern: /"[^"\r\n]*"/,
    greedy: true,
  },

  'location-counter': {
    pattern: /\B\.\B/,
    alias: 'important',
  },

  section: {
    pattern: /(^|[^\w*])\.\w+\b/,
    lookbehind: true,
    alias: 'keyword',
  },
  function: /\b[A-Z][A-Z_]*(?=\s*\()/,

  number: /\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,

  operator: />>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,
  punctuation: /[(){},;]/,
};

Prism.languages['ld'] = Prism.languages['linker-script'];