all repos — NoPaste @ 3e3c433f026c49e04d0efa0f0f39fc688ed32bb1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/oz/index.html (view raw)

 1<!doctype html>
 2
 3<title>CodeMirror: Oz 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="oz.js"></script>
10<script src="../../addon/runmode/runmode.js"></script>
11<style>
12  .CodeMirror {border: 1px solid #aaa;}
13</style>
14<div id=nav>
15  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
16  <ul>
17    <li><a href="../../index.html">Home</a>
18    <li><a href="../../doc/manual.html">Manual</a>
19    <li><a href="https://github.com/codemirror/codemirror">Code</a>
20  </ul>
21  <ul>
22    <li><a href="../index.html">Language modes</a>
23    <li><a class=active href="#">Oz</a>
24  </ul>
25</div>
26
27<article>
28<h2>Oz mode</h2>
29<textarea id="code" name="code">
30declare
31fun {Ints N Max}
32  if N == Max then nil
33  else
34    {Delay 1000}
35    N|{Ints N+1 Max}
36  end
37end
38
39fun {Sum S Stream}
40  case Stream of nil then S
41  [] H|T then S|{Sum H+S T} end
42end
43
44local X Y in
45  thread X = {Ints 0 1000} end
46  thread Y = {Sum 0 X} end
47  {Browse Y}
48end
49</textarea>
50<p>MIME type defined: <code>text/x-oz</code>.</p>
51
52<script>
53var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
54    lineNumbers: true,
55    mode: "text/x-oz",
56    readOnly: false
57});
58</script>
59</article>