File modules/editor/codemirror/mode/pig/index.html

Last commit: Sun Dec 17 01:14:09 2017 +0100	Jan Dankert	Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.
1 <!doctype html> 2 <title>CodeMirror: Pig Latin mode</title> 3 <meta charset="utf-8"/> 4 <link rel=stylesheet href="../../doc/docs.css"> 5 6 <link rel="stylesheet" href="../../lib/codemirror.css"> 7 <script src="../../lib/codemirror.js"></script> 8 <script src="pig.js"></script> 9 <style>.CodeMirror {border: 2px inset #dee;}</style> 10 <div id=nav> 11 <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> 12 13 <ul> 14 <li><a href="../../index.html">Home</a> 15 <li><a href="../../doc/manual.html">Manual</a> 16 <li><a href="https://github.com/codemirror/codemirror">Code</a> 17 </ul> 18 <ul> 19 <li><a href="../index.html">Language modes</a> 20 <li><a class=active href="#">Pig Latin</a> 21 </ul> 22 </div> 23 24 <article> 25 <h2>Pig Latin mode</h2> 26 <form><textarea id="code" name="code"> 27 -- Apache Pig (Pig Latin Language) Demo 28 /* 29 This is a multiline comment. 30 */ 31 a = LOAD "\path\to\input" USING PigStorage('\t') AS (x:long, y:chararray, z:bytearray); 32 b = GROUP a BY (x,y,3+4); 33 c = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z; 34 STORE c INTO "\path\to\output"; 35 36 -- 37 </textarea></form> 38 39 <script> 40 var editor = CodeMirror.fromTextArea(document.getElementById("code"), { 41 lineNumbers: true, 42 indentUnit: 4, 43 mode: "text/x-pig" 44 }); 45 </script> 46 47 <p> 48 Simple mode that handles Pig Latin language. 49 </p> 50 51 <p><strong>MIME type defined:</strong> <code>text/x-pig</code> 52 (PIG code) 53 </article>
Download modules/editor/codemirror/mode/pig/index.html
History Sun, 17 Dec 2017 01:14:09 +0100 Jan Dankert Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.