forked from gkz/LiveScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathace.html
More file actions
52 lines (47 loc) · 1.19 KB
/
ace.html
File metadata and controls
52 lines (47 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content=IE=edge,chrome=1>
<title>ace/mode/livescript</title>
<style>
body {overflow:hidden}
#editor {margin:0; position:absolute; top:0; bottom:0; left:0; right:0}
</style>
<pre id=editor>
#!/usr/bin/env livescript
try
throw URIError decodeURI 0xbad - 32~123 * 123456.7e+8f
catch e
console.log \word + 'qstring' + "qqstring" + '''
qdoc
''' + """
qqdoc
"""
do ->
switch it
case <[ quoted words ]>
return /regex/imgy.test //
heregex # comment
//imgy
/* JS Comment */
this is: not JS
void
public illegal
[1 2 3] |> sum-of-number
true false yes no on off
null void undefined
</pre>
<script src=http://ajaxorg.github.com/ace/build/src/ace.js></script>
<script src=../lib/mode-ls.js></script>
<script>!function(){
self.editor = ace.edit('editor')
self.session = editor.getSession()
editor.setShowInvisibles(true)
session.setMode(new (require('ace/mode/ls')).Mode)
session.setTabSize(2)
try { var code = localStorage.code } catch(_){ return }
if(code) session.setValue(code)
setInterval(self.onunload = function(){
localStorage.code = session.getValue()
}, 1e4)
}()
</script>