prism-llvm.js 654 B

12345678910111213141516171819
  1. (function (Prism) {
  2. Prism.languages.llvm = {
  3. 'comment': /;.*/,
  4. 'string': {
  5. pattern: /"[^"]*"/,
  6. greedy: true,
  7. },
  8. 'boolean': /\b(?:false|true)\b/,
  9. 'variable': /[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,
  10. 'label': /(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,
  11. 'type': {
  12. pattern: /\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,
  13. alias: 'class-name',
  14. },
  15. 'keyword': /\b[a-z_][a-z_0-9]*\b/,
  16. 'number': /[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,
  17. 'punctuation': /[{}[\];(),.!*=<>]/,
  18. };
  19. }(Prism));