-
Notifications
You must be signed in to change notification settings - Fork 0
/
runner.html
80 lines (72 loc) · 1.77 KB
/
runner.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<html>
<head>
<script src="lib/jquery.min.js"></script>
<script src="src/bootstrap.js"></script>
<script src="src/runtime.js"></script>
<script src="src/util.js"></script>
<script src="src/symbol.js"></script>
<script src="src/lexer.js"></script>
<script src="src/functionParser.js"></script>
<script src="src/classParser.js"></script>
<script src="src/objectParser.js"></script>
<script src="src/expressionParser.js"></script>
<script src="src/parser.js"></script>
<script src="src/interpreter.js"></script>
<script src="src/jazz.js"></script>
<script type="jazz">
person = (_name) {
priv = () {
log "ha!"
}
{
name = _name
talk = () {
priv()
log "hihi"
log "my name is " + name
}
}
}
p = person("bruno")
p.talk()
</script>
f = () {
x = 1
g = () {
log x
}
}
f()()
l = [1, 2, 3]
log l[2 - 1]
x = 1 + 1
y = x * 2 - 3 * 2
log "-3 : " + y.add(-4).add(5).multiply(3)
log "false : " + (1 is 2.subtract(0))
log "true : " + (1 is 1.1.subtract(0.1))
p = {
name = "john"
age = 12
greet = () {
"yes!"
}
toString = () {
"JOHN'S OBJECT"
}
}
log p.name
log p.age
log p.greet()
log p.asString()
class Person {}
log "Person : " + Person.name()
log "Class Person : " + Person.asString()
p2 = Person.new()
log "Object[Person] : " + p2.asString()
<script type="text/javascript">
jazz.run();
</script>
</head>
<body>
</body>
</html>