move a few things away in to-be-integrated/
[myslice.git] / to-be-integrated / third-party / codemirror-3.15 / mode / lua / index.html
1 <!doctype html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>CodeMirror: Lua mode</title>
6     <link rel="stylesheet" href="../../lib/codemirror.css">
7     <script src="../../addon/edit/matchbrackets.js"></script>
8     <script src="../../lib/codemirror.js"></script>
9     <script src="lua.js"></script>
10     <link rel="stylesheet" href="../../theme/neat.css">
11     <style>.CodeMirror {border: 1px solid black;}</style>
12     <link rel="stylesheet" href="../../doc/docs.css">
13   </head>
14   <body>
15     <h1>CodeMirror: Lua mode</h1>
16     <form><textarea id="code" name="code">
17 --[[
18 example useless code to show lua syntax highlighting
19 this is multiline comment
20 ]]
21
22 function blahblahblah(x)
23
24   local table = {
25     "asd" = 123,
26     "x" = 0.34,  
27   }
28   if x ~= 3 then
29     print( x )
30   elseif x == "string"
31     my_custom_function( 0x34 )
32   else
33     unknown_function( "some string" )
34   end
35
36   --single line comment
37   
38 end
39
40 function blablabla3()
41
42   for k,v in ipairs( table ) do
43     --abcde..
44     y=[=[
45   x=[[
46       x is a multi line string
47    ]]
48   but its definition is iside a highest level string!
49   ]=]
50     print(" \"\" ")
51
52     s = math.sin( x )
53   end
54
55 end
56 </textarea></form>
57     <script>
58       var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
59         tabMode: "indent",
60         matchBrackets: true,
61         theme: "neat"
62       });
63     </script>
64
65     <p>Loosely based on Franciszek
66     Wawrzak's <a href="http://codemirror.net/1/contrib/lua">CodeMirror
67     1 mode</a>. One configuration parameter is
68     supported, <code>specials</code>, to which you can provide an
69     array of strings to have those identifiers highlighted with
70     the <code>lua-special</code> style.</p>
71     <p><strong>MIME types defined:</strong> <code>text/x-lua</code>.</p>
72
73   </body>
74 </html>