This website works better with JavaScript.
Home
Explore
Help
Sign In
piumarta
/
javascrypt
mirror of
https://github.com/mtardy/javascrypt.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
1
Wiki
Activity
Browse Source
Update tests
pull/8/head
mtardy
4 years ago
parent
07f07570db
commit
5598b131e2
2 changed files
with
40 additions
and
11 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+33
-1
test-object.txt
+7
-10
test3.txt
+ 33
- 1
test-object.txt
View File
@ -61,4 +61,36 @@ Object.print = fun () {
this;
}
p.println()
p.println()
fun println() {
apply(print, __arguments__)
print("\n")
}
fun makeAst() {
print("Making an AST!")
return t
}
var t = `(3+4)
println(t)
var a = 333
syntax double(a) {
return `(@a+@a)
}
double(21)
syntax until(c, b) {
return `(while (!@c) @b)
}
var x = 0
/*
until(x==10) {
println(x++)
}
*/
(`x).println()
+ 7
- 10
test3.txt
View File
@ -1,12 +1,9 @@
var o = {}
o.a = 12
o.b = "salut"
var c = clone(o, "12");
var num = `4; // THESE ARE THE
var ast = `(3+@num); // IMPORTANT 2 LINES
c.a = 24
c.b = "au revoir"
c.chips = "on va manger, des chips!!!"
fun f() {
var c = `4+3
return 5 + @c
}
o
c
f()
Write
Preview
Loading…
Cancel
Save