prism-qore.js 1.1 KB

1234567891011121314151617181920
  1. Prism.languages.qore = Prism.languages.extend('clike', {
  2. 'comment': {
  3. pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,
  4. lookbehind: true
  5. },
  6. // Overridden to allow unescaped multi-line strings
  7. 'string': {
  8. pattern: /("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
  9. greedy: true
  10. },
  11. 'variable': /\$(?!\d)\w+\b/,
  12. 'keyword': /\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:int|float|number|bool|string|date|list)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,
  13. 'number': /\b(?:0b[01]+|0x[\da-f]*\.?[\da-fp\-]+|\d*\.?\d+e?\d*[df]|\d*\.?\d+)\b/i,
  14. 'boolean': /\b(?:true|false)\b/i,
  15. 'operator': {
  16. pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,
  17. lookbehind: true
  18. },
  19. 'function': /\$?\b(?!\d)\w+(?=\()/
  20. });