github.com/elliott5/community@v0.14.1-0.20160709191136-823126fb026a/app/public/codemirror/mode/pig/index.html (about)

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