UNPKG

606 BJavaScriptView Raw
1Prism.languages['linker-script'] = {
2 'comment': {
3 pattern: /(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,
4 lookbehind: true,
5 greedy: true
6 },
7 'identifier': {
8 pattern: /"[^"\r\n]*"/,
9 greedy: true
10 },
11
12 'location-counter': {
13 pattern: /\B\.\B/,
14 alias: 'important'
15 },
16
17 'section': {
18 pattern: /(^|[^\w*])\.\w+\b/,
19 lookbehind: true,
20 alias: 'keyword'
21 },
22 'function': /\b[A-Z][A-Z_]*(?=\s*\()/,
23
24 'number': /\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,
25
26 'operator': />>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,
27 'punctuation': /[(){},;]/
28};
29
30Prism.languages['ld'] = Prism.languages['linker-script'];