summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-processing.js
blob: 82be7dd788bd880e204a1916cd65afd8f1ec2482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Prism.languages.processing = Prism.languages.extend('clike', {
  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/,
  // Spaces are allowed between function name and parenthesis
  function: /\b\w+(?=\s*\()/,
  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|[A-Z]\w*)\b/,
    alias: 'class-name',
  },
});
quot;[^"\r\n]*"|'[^'\r\n]*'/, greedy: !0, inside: { guid: t }, }, object: { pattern: /^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m, lookbehind: !0, greedy: !0, alias: 'keyword', }, property: { pattern: /^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m, lookbehind: !0, inside: { guid: t }, }, guid: t, number: /\b\d+(?:\.\d+)*\b/, boolean: /\b(?:FALSE|TRUE)\b/, operator: /=/, punctuation: /[(),]/, }), (n.languages.sln = n.languages['solution-file']); })(Prism);