prism-scala.js 662 B

123456789
  1. Prism.languages.scala = Prism.languages.extend('java', {
  2. 'keyword': /(<-|=>)|\b(abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,
  3. 'builtin': /\b(String|Int|Long|Short|Byte|Boolean|Double|Float|Char|Any|AnyRef|AnyVal|Unit|Nothing)\b/,
  4. 'number': /\b0x[\da-f]*\.?[\da-f\-]+\b|\b\d*\.?\d+[e]?[\d]*[dfl]?\b/i,
  5. 'symbol': /'([^\d\s]\w*)/,
  6. 'string': /(""")[\W\w]*?\1|("|\/)[\W\w]*?\2|('.')/
  7. });
  8. delete Prism.languages.scala['class-name'];
  9. delete Prism.languages.scala['function'];