source: node_modules/refractor/lang/processing.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 806 bytes
Line 
1'use strict'
2
3module.exports = processing
4processing.displayName = 'processing'
5processing.aliases = []
6function processing(Prism) {
7 Prism.languages.processing = Prism.languages.extend('clike', {
8 keyword:
9 /\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/,
10 // Spaces are allowed between function name and parenthesis
11 function: /\b\w+(?=\s*\()/,
12 operator: /<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/
13 })
14 Prism.languages.insertBefore('processing', 'number', {
15 // Special case: XML is a type
16 constant: /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
17 type: {
18 pattern: /\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,
19 alias: 'class-name'
20 }
21 })
22}
Note: See TracBrowser for help on using the repository browser.