command line: --literate-unicode
https://github.com/rusthon/Rusthon/wiki/JavaScript-Unicode-Literate-Output
@index.html
<html>
<head>
<script src="~/ace-builds/src-min/ace.js" type="text/javascript"></script>
<script src="~/ace-builds/src-min/theme-monokai.js" type="text/javascript"></script>
<script src="~/ace-builds/src-min/worker-javascript.js" type="text/javascript"></script>
<script src="~/ace-builds/src-min/mode-javascript.js" type="text/javascript"></script>
<@js>
<@py>
</head>
<body onload="test()">
</body>
</html>https://mothereff.in/js-variables
@js
function π©add( x,y ) {
return {π©:x+y}
};
var ππΆπΆπππ = {
π¨ : function (x,y) {
π·ππππ(x+y);
return π©add(x,y);
},
x : 20
};
var πππ = 'UNICODE_OK';
var π¦ = {
π§ : ππΆπΆπππ,
πππ : 'xxx'
};
var W = π¦;@py
#backend:javascript
from runtime import *
def π¬( a ):
return a * 2
class κ:
def __init__(self):
self.name = 'α'
class πππ( κ ):
def bark(self, say):
print say
alert(self.name)
@debugger
def test():
foobar = ππΆπΆπππ
assert πππ == 'UNICODE_OK'
print foobar
print π¦.π§.π¨(foobar).π©
π¦.π§.πππ = 'bar'
assert π¬( 2 ) == 4
with κ as "console.log(%s)":
κ( 'macro ok')
with κ as "document.body.appendChild(%s)":
with κ’ as "document.createElement(%s)":
with πππ as "e.appendChild(document.createTextNode(%s))":
for i in range(10):
e = κ’('div')
κ( e )
πππ('macro:'+i)
e = κ’('button')
κ( e )
πππ('mybutton:'+i)
#a.x.y = 'oopps'
#show( some_missing_object[ 'x' ] )
#mytypo()
dog = πππ()
dog.bark('woof')