prism-processing.js 638 B

123456789101112131415
  1. Prism.languages.processing = Prism.languages.extend('clike', {
  2. 'keyword': /\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,
  3. // Spaces are allowed between function name and parenthesis
  4. 'function': /\b\w+(?=\s*\()/,
  5. 'operator': /<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/
  6. });
  7. Prism.languages.insertBefore('processing', 'number', {
  8. // Special case: XML is a type
  9. 'constant': /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
  10. 'type': {
  11. pattern: /\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,
  12. alias: 'class-name'
  13. }
  14. });