UNPKG

638 BJavaScriptView Raw
1Prism.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
8Prism.languages.insertBefore('processing', 'number', {
9 // Special case: XML is a type
10 'constant': /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
11 'type': {
12 pattern: /\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,
13 alias: 'class-name'
14 }
15});