Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scala keywords taken from specs and simplified scala/java.lang
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,4 +231,41 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { | |
} | ||
} | ||
}); | ||
CodeMirror.defineMIME("text/x-scala", { | ||
name: "clike", | ||
keywords: words( | ||
|
||
/* scala */ | ||
"abstract case catch class def do else extends false final finally for forSome if " + | ||
"implicit import lazy match new null object override package private protected return " + | ||
"sealed super this throw trait try trye type cal var while with yield _ : = => <- <: " + | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
MasseGuillaume
Contributor
|
||
"<% >: # @ " + | ||
|
||
/* package scala */ | ||
"assert assume require print println printf readLine readBoolean readByte readShort " + | ||
"readChar readInt readLong readFloat readDouble " + | ||
|
||
"AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " + | ||
"Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " + | ||
"Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " + | ||
"Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " + | ||
"StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " + | ||
|
||
/* package java.lang */ | ||
"Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + | ||
"Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + | ||
"Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + | ||
"StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void" | ||
|
||
|
||
), | ||
blockKeywords: words("catch class do else finally for forSome if match switch try while"), | ||
atoms: words("true false null"), | ||
hooks: { | ||
"@": function(stream, state) { | ||
stream.eatWhile(/[\w\$_]/); | ||
return "meta"; | ||
} | ||
} | ||
}); | ||
}()); |
should be