| Index: lib/src/prism/components/prism-processing.js
|
| diff --git a/lib/src/prism/components/prism-processing.js b/lib/src/prism/components/prism-processing.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e901ce2e629a53ab029b12b85899bbfb5d6d8323
|
| --- /dev/null
|
| +++ b/lib/src/prism/components/prism-processing.js
|
| @@ -0,0 +1,18 @@
|
| +Prism.languages.processing = Prism.languages.extend('clike', {
|
| + 'keyword': /\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,
|
| + 'operator': /<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/
|
| +});
|
| +Prism.languages.insertBefore('processing', 'number', {
|
| + // Special case: XML is a type
|
| + 'constant': /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
|
| + 'type': {
|
| + pattern: /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z][A-Za-z\d_]*)\b/,
|
| + alias: 'variable'
|
| + }
|
| +});
|
| +
|
| +// Spaces are allowed between function name and parenthesis
|
| +Prism.languages.processing['function'].pattern = /[a-z0-9_]+(?=\s*\()/i;
|
| +
|
| +// Class-names is not styled by default
|
| +Prism.languages.processing['class-name'].alias = 'variable';
|
|
|