diff options
author | goatchurch <devnull@localhost> | 2009-06-28 21:26:35 +0100 |
---|---|---|
committer | goatchurch <devnull@localhost> | 2009-06-28 21:26:35 +0100 |
commit | 16b7404d9bc2f9ba264f140310948897689fe3ca (patch) | |
tree | cae9ee2d6ea64b7a80602f587ee539f6501ed4d7 /media/CodeMirror-0.62/contrib/lua/index.html | |
parent | db5e315db022cd253a9f7224637228bf62449ec6 (diff) | |
download | troggle-16b7404d9bc2f9ba264f140310948897689fe3ca.tar.gz troggle-16b7404d9bc2f9ba264f140310948897689fe3ca.tar.bz2 troggle-16b7404d9bc2f9ba264f140310948897689fe3ca.zip |
[svn] horrid .svns copied accidentally
Diffstat (limited to 'media/CodeMirror-0.62/contrib/lua/index.html')
-rw-r--r-- | media/CodeMirror-0.62/contrib/lua/index.html | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/media/CodeMirror-0.62/contrib/lua/index.html b/media/CodeMirror-0.62/contrib/lua/index.html new file mode 100644 index 0000000..03a3229 --- /dev/null +++ b/media/CodeMirror-0.62/contrib/lua/index.html @@ -0,0 +1,68 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <script src="../../js/codemirror.js" type="text/javascript"></script> + <title>CodeMirror: Lua demonstration</title> + </head> + <body style="padding: 20px;"> + +<p>This page demonstrates <a href="../../index.html">CodeMirror</a>'s +Lua parser. Written by <a href="http://francio.pl/">Franciszek +Wawrzak</a>, released under a BSD-style <a +href="LICENSE">license</a>.</p> + +<div style="border: 1px solid black; padding: 0px;"> +<textarea id="code" cols="120" rows="30"> +--[[ +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( "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(" \"\" ") + --this marks a parser error: + s = [== asdasdasd]] + + s = math.sin( x ) + end + +end +</textarea> +</div> + +<script type="text/javascript"> + var editor = CodeMirror.fromTextArea('code', { + height: "350px", + parserfile: "../contrib/lua/js/parselua.js", + stylesheet: "css/luacolors.css", + path: "../../js/" + }); +</script> + </body> +</html> |