prism-pcaxis.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Prism.languages.pcaxis = {
  2. 'string': /"[^"]*"/,
  3. 'keyword': {
  4. pattern: /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,
  5. lookbehind: true,
  6. greedy: true,
  7. inside: {
  8. 'keyword': /^[-A-Z\d]+/,
  9. 'language': {
  10. pattern: /^(\s*)\[[-\w]+\]/,
  11. lookbehind: true,
  12. inside: {
  13. 'punctuation': /^\[|\]$/,
  14. 'property': /[-\w]+/
  15. }
  16. },
  17. 'sub-key': {
  18. pattern: /^(\s*)\S[\s\S]*/,
  19. lookbehind: true,
  20. inside: {
  21. 'parameter': {
  22. pattern: /"[^"]*"/,
  23. alias: 'property'
  24. },
  25. 'punctuation': /^\(|\)$|,/
  26. }
  27. }
  28. }
  29. },
  30. 'operator': /=/,
  31. 'tlist': {
  32. pattern: /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,
  33. greedy: true,
  34. inside: {
  35. 'function': /^TLIST/,
  36. 'property': {
  37. pattern: /^(\s*\(\s*)\w+/,
  38. lookbehind: true
  39. },
  40. 'string': /"[^"]*"/,
  41. 'punctuation': /[(),]/,
  42. 'operator': /-/
  43. }
  44. },
  45. 'punctuation': /[;,]/,
  46. 'number': {
  47. pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/,
  48. lookbehind: true
  49. },
  50. 'boolean': /NO|YES/,
  51. };
  52. Prism.languages.px = Prism.languages.pcaxis;