prism-linker-script.js 606 B

123456789101112131415161718192021222324252627282930
  1. Prism.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. 'location-counter': {
  12. pattern: /\B\.\B/,
  13. alias: 'important'
  14. },
  15. 'section': {
  16. pattern: /(^|[^\w*])\.\w+\b/,
  17. lookbehind: true,
  18. alias: 'keyword'
  19. },
  20. 'function': /\b[A-Z][A-Z_]*(?=\s*\()/,
  21. 'number': /\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,
  22. 'operator': />>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,
  23. 'punctuation': /[(){},;]/
  24. };
  25. Prism.languages['ld'] = Prism.languages['linker-script'];