diff options
author | Jon Reid | 2012-07-17 16:03:14 -0700 |
---|---|---|
committer | Jon Reid | 2012-07-17 16:03:14 -0700 |
commit | 42a51e0c27f2e2cd825d07b3af5ec05b0e5208b3 (patch) | |
tree | 67deeb8c5b34aacc91f737cc64a3bc9ef1f4f05f /imports/codemirror/mode/pig/index.html | |
parent | a12cabc16273ffe04af4bce1f7438dc9326efa89 (diff) | |
parent | b4b3e45d6684e77d361b4f8ca5be4889428320c5 (diff) | |
download | ninja-42a51e0c27f2e2cd825d07b3af5ec05b0e5208b3.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'imports/codemirror/mode/pig/index.html')
-rw-r--r-- | imports/codemirror/mode/pig/index.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/imports/codemirror/mode/pig/index.html b/imports/codemirror/mode/pig/index.html new file mode 100644 index 00000000..9cd69c4f --- /dev/null +++ b/imports/codemirror/mode/pig/index.html | |||
@@ -0,0 +1,42 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: Pig Latin mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="pig.js"></script> | ||
8 | <link rel="stylesheet" href="../../doc/docs.css"> | ||
9 | <style>.CodeMirror {border: 2px inset #dee;}</style> | ||
10 | </head> | ||
11 | <body> | ||
12 | <h1>CodeMirror: Pig Latin mode</h1> | ||
13 | |||
14 | <form><textarea id="code" name="code"> | ||
15 | -- Apache Pig (Pig Latin Language) Demo | ||
16 | /* | ||
17 | This is a multiline comment. | ||
18 | */ | ||
19 | a = LOAD "\path\to\input" USING PigStorage('\t') AS (x:long, y:chararray, z:bytearray); | ||
20 | b = GROUP a BY (x,y,3+4); | ||
21 | c = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z; | ||
22 | STORE c INTO "\path\to\output"; | ||
23 | |||
24 | -- | ||
25 | </textarea></form> | ||
26 | |||
27 | <script> | ||
28 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
29 | lineNumbers: true, | ||
30 | matchBrackets: true, | ||
31 | indentUnit: 4, | ||
32 | mode: "text/x-pig" | ||
33 | }); | ||
34 | </script> | ||
35 | |||
36 | <p> | ||
37 | Simple mode that handles Pig Latin language. | ||
38 | </p> | ||
39 | |||
40 | <p><strong>MIME type defined:</strong> <code>text/x-pig</code> | ||
41 | (PIG code) | ||
42 | </html> | ||