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