|
@@ -7,11 +7,12 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
|
|
|
|
|
|
var ScalaHighlightRules = function() {
|
|
var ScalaHighlightRules = function() {
|
|
|
|
|
|
|
|
- // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
|
|
|
|
|
var keywords = (
|
|
var keywords = (
|
|
|
- "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
|
|
|
|
|
- "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
|
|
|
|
|
- "override|package|private|protected|sealed|super|this|trait|type|val|var|with"
|
|
|
|
|
|
|
+ "case|default|do|else|for|if|match|while|throw|return|try|trye|catch|finally|yield|" +
|
|
|
|
|
+ "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|null|" +
|
|
|
|
|
+ "override|package|private|protected|sealed|super|this|trait|type|val|var|with|" +
|
|
|
|
|
+ "assert|assume|require|print|println|printf|readLine|readBoolean|readByte|readShort|" + // package scala
|
|
|
|
|
+ "readChar|readInt|readLong|readFloat|readDouble" // package scala
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
var buildinConstants = ("true|false");
|
|
var buildinConstants = ("true|false");
|
|
@@ -43,7 +44,13 @@ var ScalaHighlightRules = function() {
|
|
|
"Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
|
|
"Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
|
|
|
"Cloneable|Class|CharSequence|Comparable|String|Object|" +
|
|
"Cloneable|Class|CharSequence|Comparable|String|Object|" +
|
|
|
"Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
|
|
"Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
|
|
|
- "Option|Array|Char|Byte|Short|Int|Long|Nothing"
|
|
|
|
|
|
|
+ "Option|Array|Char|Byte|Int|Long|Nothing|" +
|
|
|
|
|
+
|
|
|
|
|
+ "App|Application|BufferedIterator|BigDecimal|BigInt|Console|Either|" +
|
|
|
|
|
+ "Enumeration|Equiv|Fractional|Function|IndexedSeq|Integral|Iterator|" +
|
|
|
|
|
+ "Map|Numeric|Nil|NotNull|Ordered|Ordering|PartialFunction|PartialOrdering|" +
|
|
|
|
|
+ "Product|Proxy|Range|Responder|Seq|Serializable|Set|Specializable|Stream|" +
|
|
|
|
|
+ "StringContext|Symbol|Traversable|TraversableOnce|Tuple|Vector|Pair|Triple"
|
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
);
|