فهرست منبع

[core] Add missing keywords to the Ace Scala autocompleter

Enrico Berti 10 سال پیش
والد
کامیت
f1ff822

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-scala.js


+ 12 - 5
tools/ace-editor/lib/ace/mode/scala_highlight_rules.js

@@ -7,11 +7,12 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 
 var ScalaHighlightRules = function() {
 
-    // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
     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");
@@ -43,7 +44,13 @@ var ScalaHighlightRules = function() {
         "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
         "Cloneable|Class|CharSequence|Comparable|String|Object|" +
         "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"
 
 
     );

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است