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 /js/codemirror/mode/scheme/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 'js/codemirror/mode/scheme/index.html')
-rw-r--r-- | js/codemirror/mode/scheme/index.html | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/js/codemirror/mode/scheme/index.html b/js/codemirror/mode/scheme/index.html deleted file mode 100644 index 32402325..00000000 --- a/js/codemirror/mode/scheme/index.html +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror 2: Scheme mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="scheme.js"></script> | ||
8 | <link rel="stylesheet" href="../../theme/default.css"> | ||
9 | <style>.CodeMirror {background: #f8f8f8;}</style> | ||
10 | <link rel="stylesheet" href="../../css/docs.css"> | ||
11 | </head> | ||
12 | <body> | ||
13 | <h1>CodeMirror 2: Scheme mode</h1> | ||
14 | <form><textarea id="code" name="code"> | ||
15 | ; See if the input starts with a given symbol. | ||
16 | (define (match-symbol input pattern) | ||
17 | (cond ((null? (remain input)) #f) | ||
18 | ((eqv? (car (remain input)) pattern) (r-cdr input)) | ||
19 | (else #f))) | ||
20 | |||
21 | ; Allow the input to start with one of a list of patterns. | ||
22 | (define (match-or input pattern) | ||
23 | (cond ((null? pattern) #f) | ||
24 | ((match-pattern input (car pattern))) | ||
25 | (else (match-or input (cdr pattern))))) | ||
26 | |||
27 | ; Allow a sequence of patterns. | ||
28 | (define (match-seq input pattern) | ||
29 | (if (null? pattern) | ||
30 | input | ||
31 | (let ((match (match-pattern input (car pattern)))) | ||
32 | (if match (match-seq match (cdr pattern)) #f)))) | ||
33 | |||
34 | ; Match with the pattern but no problem if it does not match. | ||
35 | (define (match-opt input pattern) | ||
36 | (let ((match (match-pattern input (car pattern)))) | ||
37 | (if match match input))) | ||
38 | |||
39 | ; Match anything (other than '()), until pattern is found. The rather | ||
40 | ; clumsy form of requiring an ending pattern is needed to decide where | ||
41 | ; the end of the match is. If none is given, this will match the rest | ||
42 | ; of the sentence. | ||
43 | (define (match-any input pattern) | ||
44 | (cond ((null? (remain input)) #f) | ||
45 | ((null? pattern) (f-cons (remain input) (clear-remain input))) | ||
46 | (else | ||
47 | (let ((accum-any (collector))) | ||
48 | (define (match-pattern-any input pattern) | ||
49 | (cond ((null? (remain input)) #f) | ||
50 | (else (accum-any (car (remain input))) | ||
51 | (cond ((match-pattern (r-cdr input) pattern)) | ||
52 | (else (match-pattern-any (r-cdr input) pattern)))))) | ||
53 | (let ((retval (match-pattern-any input (car pattern)))) | ||
54 | (if retval | ||
55 | (f-cons (accum-any) retval) | ||
56 | #f)))))) | ||
57 | </textarea></form> | ||
58 | <script> | ||
59 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), {}); | ||
60 | </script> | ||
61 | |||
62 | <p><strong>MIME types defined:</strong> <code>text/x-scheme</code>.</p> | ||
63 | |||
64 | </body> | ||
65 | </html> | ||