aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-07-17 14:01:12 -0700
committerJose Antonio Marquez2012-07-17 14:01:12 -0700
commitf40c8c58638da8fcd9a7abb06b8f2a4c6ba995bd (patch)
treecb1ff6a31b144fe4f584f778d5691f06362b227e /imports/codemirror/mode
parent17d464e5bd224cdd8940855409359b411325f1df (diff)
parent4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff)
downloadninja-f40c8c58638da8fcd9a7abb06b8f2a4c6ba995bd.tar.gz
Merge branch 'refs/heads/Ninja-Master' into Document
Diffstat (limited to 'imports/codemirror/mode')
-rw-r--r--imports/codemirror/mode/clike/clike.js39
-rw-r--r--imports/codemirror/mode/clike/scala.html765
-rw-r--r--imports/codemirror/mode/coffeescript/coffeescript.js6
-rw-r--r--imports/codemirror/mode/coffeescript/index.html6
-rw-r--r--imports/codemirror/mode/diff/diff.css3
-rw-r--r--imports/codemirror/mode/diff/diff.js29
-rw-r--r--imports/codemirror/mode/diff/index.html13
-rw-r--r--imports/codemirror/mode/ecl/ecl.js2
-rw-r--r--imports/codemirror/mode/erlang/erlang.js251
-rw-r--r--imports/codemirror/mode/erlang/index.html61
-rw-r--r--imports/codemirror/mode/gfm/gfm.js42
-rw-r--r--imports/codemirror/mode/htmlembedded/htmlembedded.js2
-rw-r--r--imports/codemirror/mode/htmlmixed/htmlmixed.js4
-rw-r--r--imports/codemirror/mode/javascript/javascript.js9
-rw-r--r--imports/codemirror/mode/less/index.html25
-rw-r--r--imports/codemirror/mode/less/less.js42
-rw-r--r--imports/codemirror/mode/markdown/markdown.js2
-rw-r--r--imports/codemirror/mode/php/php.js2
-rw-r--r--imports/codemirror/mode/pig/index.html42
-rw-r--r--imports/codemirror/mode/pig/pig.js172
-rw-r--r--imports/codemirror/mode/python/python.js30
-rw-r--r--imports/codemirror/mode/rst/rst.js2
-rw-r--r--imports/codemirror/mode/ruby/ruby.js11
-rw-r--r--imports/codemirror/mode/scheme/scheme.js120
-rw-r--r--imports/codemirror/mode/shell/index.html50
-rw-r--r--imports/codemirror/mode/shell/shell.js103
-rw-r--r--imports/codemirror/mode/stex/stex.js10
-rw-r--r--imports/codemirror/mode/stex/test.html12
-rw-r--r--imports/codemirror/mode/tiddlywiki/tiddlywiki.css35
-rw-r--r--imports/codemirror/mode/tiddlywiki/tiddlywiki.js28
-rw-r--r--imports/codemirror/mode/tiki/index.html82
-rw-r--r--imports/codemirror/mode/tiki/tiki.css26
-rw-r--r--imports/codemirror/mode/tiki/tiki.js316
-rw-r--r--imports/codemirror/mode/xml/xml.js69
-rw-r--r--imports/codemirror/mode/xmlpure/index.html58
-rw-r--r--imports/codemirror/mode/xmlpure/xmlpure.js490
36 files changed, 2251 insertions, 708 deletions
diff --git a/imports/codemirror/mode/clike/clike.js b/imports/codemirror/mode/clike/clike.js
index 66443fb8..0e7f48b6 100644
--- a/imports/codemirror/mode/clike/clike.js
+++ b/imports/codemirror/mode/clike/clike.js
@@ -21,7 +21,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
21 } 21 }
22 if (/[\[\]{}\(\),;\:\.]/.test(ch)) { 22 if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
23 curPunc = ch; 23 curPunc = ch;
24 return null 24 return null;
25 } 25 }
26 if (/\d/.test(ch)) { 26 if (/\d/.test(ch)) {
27 stream.eatWhile(/[\w\.]/); 27 stream.eatWhile(/[\w\.]/);
@@ -231,4 +231,41 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
231 } 231 }
232 } 232 }
233 }); 233 });
234 CodeMirror.defineMIME("text/x-scala", {
235 name: "clike",
236 keywords: words(
237
238 /* scala */
239 "abstract case catch class def do else extends false final finally for forSome if " +
240 "implicit import lazy match new null object override package private protected return " +
241 "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
242 "<% >: # @ " +
243
244 /* package scala */
245 "assert assume require print println printf readLine readBoolean readByte readShort " +
246 "readChar readInt readLong readFloat readDouble " +
247
248 "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
249 "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
250 "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
251 "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
252 "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
253
254 /* package java.lang */
255 "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
256 "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
257 "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
258 "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
259
260
261 ),
262 blockKeywords: words("catch class do else finally for forSome if match switch try while"),
263 atoms: words("true false null"),
264 hooks: {
265 "@": function(stream, state) {
266 stream.eatWhile(/[\w\$_]/);
267 return "meta";
268 }
269 }
270 });
234}()); 271}());
diff --git a/imports/codemirror/mode/clike/scala.html b/imports/codemirror/mode/clike/scala.html
new file mode 100644
index 00000000..5fdd84ed
--- /dev/null
+++ b/imports/codemirror/mode/clike/scala.html
@@ -0,0 +1,765 @@
1<!doctype html>
2<html>
3 <head>
4 <title>CodeMirror: C-like mode</title>
5 <link rel="stylesheet" href="../../lib/codemirror.css">
6 <link rel="stylesheet" href="../../theme/ambiance.css">
7 <script src="../../lib/codemirror.js"></script>
8 <script src="clike.js"></script>
9 <link rel="stylesheet" href="../../doc/docs.css">
10 <style>
11 body
12 {
13 margin: 0;
14 padding: 0;
15 max-width:inherit;
16 height: 100%;
17 }
18 html, form, .CodeMirror, .CodeMirror-scroll
19 {
20 height: 100%;
21 }
22 </style>
23 </head>
24 <body>
25<form>
26<textarea id="code" name="code">
27
28 /* __ *\
29 ** ________ ___ / / ___ Scala API **
30 ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
31 ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
32 ** /____/\___/_/ |_/____/_/ | | **
33 ** |/ **
34 \* */
35
36 package scala.collection
37
38 import generic._
39 import mutable.{ Builder, ListBuffer }
40 import annotation.{tailrec, migration, bridge}
41 import annotation.unchecked.{ uncheckedVariance => uV }
42 import parallel.ParIterable
43
44 /** A template trait for traversable collections of type `Traversable[A]`.
45 *
46 * $traversableInfo
47 * @define mutability
48 * @define traversableInfo
49 * This is a base trait of all kinds of $mutability Scala collections. It
50 * implements the behavior common to all collections, in terms of a method
51 * `foreach` with signature:
52 * {{{
53 * def foreach[U](f: Elem => U): Unit
54 * }}}
55 * Collection classes mixing in this trait provide a concrete
56 * `foreach` method which traverses all the
57 * elements contained in the collection, applying a given function to each.
58 * They also need to provide a method `newBuilder`
59 * which creates a builder for collections of the same kind.
60 *
61 * A traversable class might or might not have two properties: strictness
62 * and orderedness. Neither is represented as a type.
63 *
64 * The instances of a strict collection class have all their elements
65 * computed before they can be used as values. By contrast, instances of
66 * a non-strict collection class may defer computation of some of their
67 * elements until after the instance is available as a value.
68 * A typical example of a non-strict collection class is a
69 * <a href="../immutable/Stream.html" target="ContentFrame">
70 * `scala.collection.immutable.Stream`</a>.
71 * A more general class of examples are `TraversableViews`.
72 *
73 * If a collection is an instance of an ordered collection class, traversing
74 * its elements with `foreach` will always visit elements in the
75 * same order, even for different runs of the program. If the class is not
76 * ordered, `foreach` can visit elements in different orders for
77 * different runs (but it will keep the same order in the same run).'
78 *
79 * A typical example of a collection class which is not ordered is a
80 * `HashMap` of objects. The traversal order for hash maps will
81 * depend on the hash codes of its elements, and these hash codes might
82 * differ from one run to the next. By contrast, a `LinkedHashMap`
83 * is ordered because it's `foreach` method visits elements in the
84 * order they were inserted into the `HashMap`.
85 *
86 * @author Martin Odersky
87 * @version 2.8
88 * @since 2.8
89 * @tparam A the element type of the collection
90 * @tparam Repr the type of the actual collection containing the elements.
91 *
92 * @define Coll Traversable
93 * @define coll traversable collection
94 */
95 trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr]
96 with FilterMonadic[A, Repr]
97 with TraversableOnce[A]
98 with GenTraversableLike[A, Repr]
99 with Parallelizable[A, ParIterable[A]]
100 {
101 self =>
102
103 import Traversable.breaks._
104
105 /** The type implementing this traversable */
106