diff options
author | Eric Guzman | 2012-02-16 00:22:43 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-16 00:22:43 -0800 |
commit | 82b1a273219f0ae3d119e156c7acccdbe478f441 (patch) | |
tree | 74c45e5e3afc6706b2f7a7918807f72c54cdcfc5 /imports/codemirror/mode/pascal/index.html | |
parent | af20ca9b11133dd5cefb9275dbe8fb101c3380d0 (diff) | |
parent | 966f0adaf1d4b7f2dd5a6e31643df58bff713884 (diff) | |
download | ninja-82b1a273219f0ae3d119e156c7acccdbe478f441.tar.gz |
Merge branch 'refs/heads/TreeComponents' into PresetsPanel
Diffstat (limited to 'imports/codemirror/mode/pascal/index.html')
-rwxr-xr-x | imports/codemirror/mode/pascal/index.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/imports/codemirror/mode/pascal/index.html b/imports/codemirror/mode/pascal/index.html new file mode 100755 index 00000000..6af6b460 --- /dev/null +++ b/imports/codemirror/mode/pascal/index.html | |||
@@ -0,0 +1,48 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: Pascal mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="pascal.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: Pascal mode</h1> | ||
13 | |||
14 | <div><textarea id="code" name="code"> | ||
15 | (* Example Pascal code *) | ||
16 | |||
17 | while a <> b do writeln('Waiting'); | ||
18 | |||
19 | if a > b then | ||
20 | writeln('Condition met') | ||
21 | else | ||
22 | writeln('Condition not met'); | ||
23 | |||
24 | for i := 1 to 10 do | ||
25 | writeln('Iteration: ', i:1); | ||
26 | |||
27 | repeat | ||
28 | a := a + 1 | ||
29 | until a = 10; | ||
30 | |||
31 | case i of | ||
32 | 0: write('zero'); | ||
33 | 1: write('one'); | ||
34 | 2: write('two') | ||
35 | end; | ||
36 | </textarea></div> | ||
37 | |||
38 | <script> | ||
39 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
40 | lineNumbers: true, | ||
41 | matchBrackets: true, | ||
42 | mode: "text/x-pascal" | ||
43 | }); | ||
44 | </script> | ||
45 | |||
46 | <p><strong>MIME types defined:</strong> <code>text/x-pascal</code>.</p> | ||
47 | </body> | ||
48 | </html> | ||