diff options
author | Valerio Virgillito | 2012-02-14 11:07:21 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-14 11:07:21 -0800 |
commit | f060190a3bffd9a16718f2ce0499699103d46372 (patch) | |
tree | a308fe7eacec2156c8212dff0892a3de925d5f9a /imports/codemirror/mode/rust/index.html | |
parent | f766cc203f30ea43ae8b83cf4b65d45cc4435ee9 (diff) | |
parent | 33bc9d62b8e6694500bf14d5b18187bd99a520a3 (diff) | |
download | ninja-f060190a3bffd9a16718f2ce0499699103d46372.tar.gz |
Merge branch 'FileIO' of https://github.com/joseeight/ninja-internal into integration
Diffstat (limited to 'imports/codemirror/mode/rust/index.html')
-rwxr-xr-x | imports/codemirror/mode/rust/index.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/imports/codemirror/mode/rust/index.html b/imports/codemirror/mode/rust/index.html new file mode 100755 index 00000000..a84c61e5 --- /dev/null +++ b/imports/codemirror/mode/rust/index.html | |||
@@ -0,0 +1,48 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: Rust mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="rust.js"></script> | ||
8 | <link rel="stylesheet" href="../../doc/docs.css"> | ||
9 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | ||
10 | </head> | ||
11 | <body> | ||
12 | <h1>CodeMirror: Rust mode</h1> | ||
13 | |||
14 | <div><textarea id="code" name="code"> | ||
15 | // Demo code. | ||
16 | |||
17 | type foo<T> = int; | ||
18 | tag bar { | ||
19 | some(int, foo<float>); | ||
20 | none; | ||
21 | } | ||
22 | |||
23 | fn check_crate(x: int) { | ||
24 | let v = 10; | ||
25 | alt foo { | ||
26 | 1 to 3 { | ||
27 | print_foo(); | ||
28 | if x { | ||
29 | blah() + 10; | ||
30 | } | ||
31 | } | ||
32 | (x, y) { "bye" } | ||
33 | _ { "hi" } | ||
34 | } | ||
35 | } | ||
36 | </textarea></div> | ||
37 | |||
38 | <script> | ||
39 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
40 | lineNumbers: true, | ||
41 | matchBrackets: true, | ||
42 | tabMode: "indent" | ||
43 | }); | ||
44 | </script> | ||
45 | |||
46 | <p><strong>MIME types defined:</strong> <code>text/x-rustsrc</code>.</p> | ||
47 | </body> | ||
48 | </html> | ||