Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
<!doctype html>
2
<title>CodeMirror: Lua mode</title>
3
<meta charset="utf-8" />
4
<link rel=stylesheet href="../../doc/docs.css">
5
<link rel="stylesheet" href="../../lib/codemirror.css">
6
<link rel="stylesheet" href="../../theme/neat.css">
7
<script src="../../addon/edit/matchbrackets.js"></script>
8
<script src="../../lib/codemirror.js"></script>
9
<script src="lua.js"></script>
10
<style>
11
    .CodeMirror {
12
        border: 1px solid black;
13
    }
14
</style>
15
<div id=nav>
16
    <a href="http://codemirror.net">
17
        <h1>CodeMirror</h1>
18
        <img id=logo src="../../doc/logo.png">
19
    </a>
20
    <ul>
21
        <li>
22
            <a href="../../index.html">Home</a>
23
            <li>
24
                <a href="../../doc/manual.html">Manual</a>
25
                <li>
26
                    <a href="https://github.com/codemirror/codemirror">Code</a>
27
    </ul>
28
    <ul>
29
        <li>
30
            <a href="../index.html">Language modes</a>
31
            <li>
32
                <a class=active href="#">Lua</a>
33
    </ul>
34
</div>
35
<article>
36
    <h2>Lua mode</h2>
37
    <form>
38
        <textarea id="code" name="code"> --[[ example useless code to show lua syntax highlighting this is multiline comment ]] function blahblahblah(x) local table = { "asd" = 123, "x" = 0.34, } if x ~= 3 then print( x ) elseif x == "string" my_custom_function( 0x34 ) else unknown_function(
39
            "some string" ) end --single line comment end function blablabla3() for k,v in ipairs( table ) do --abcde.. y=[=[ x=[[ x is a multi line string ]] but its definition is iside a highest level string! ]=] print(" \"\" ") s = math.sin( x ) end
40
            end </textarea>
41
    </form>
42
    <script>
43
        var editor = CodeMirror.fromTextArea(document.getElementById("code"),
44
        {
45
            matchBrackets: true,
46
            theme: "neat"
47
        });
48
    </script>
49
    <p>Loosely based on Franciszek Wawrzak's
50
        <a href="http://codemirror.net/1/contrib/lua">CodeMirror 1 mode</a>. One configuration parameter is supported, <code>specials</code>, to which you can provide an array of strings to have those identifiers highlighted with the <code>lua-special</code> style.</p>
51
    <p>
52
        <strong>MIME types defined:</strong> <code>text/x-lua</code>.</p>
53
</article>