moon.p function and clean up todo

This commit is contained in:
leaf corcoran 2011-11-20 17:52:19 -08:00
parent 02a5dbcdd1
commit 48d491aa84
3 changed files with 9 additions and 16 deletions

View File

@ -6,6 +6,9 @@ local lua = {
debug = debug
}
dump = util.dump
p = function(...)
return print(dump(...))
end
debug = {
upvalue = function(fn, k, v)
local upvalues = { }

View File

@ -10,6 +10,9 @@ export *
dump = util.dump
p = (...) ->
print dump ...
debug = {
upvalue: (fn, k, v) ->
upvalues = {}

19
todo
View File

@ -1,13 +1,13 @@
# TODO
-- seems like running in moon messes up require order
- don't reuse _, put a local on it, so we don't keep around trash
-- swithc X with Func
- or= and=
- move stuff out of format that should be in types
- a do block for making a quick anon func and calling it
- error with stray comma at end of line
@ -15,9 +15,6 @@
- dump node in mark, see why values are being parsed multiple times
if hello else world
-> if hello then hello else world
- varargs that get put in a nested generated function aren't valid anymore:
- class expressions, x = class extends Hello do new: => print "hello"
@ -31,18 +28,13 @@ if hello else world
* elseif with value that inserts lines
- need to decompose elif into if inside else
* export could also be used like so:
export a = -> "hello"
or
* export later?
x = 232
export x
* allow return anywhere in block
* upercase constants and capital letter variables should automatically be exported (in the global scope?)
* any/every keywords for comprehensions? (what about iterators)
@ -51,10 +43,5 @@ not working right:
double_args = (...) ->
[x * 2 for x in *{...}]
still some issues with whitespace at end of line
* let array items in table be defined without {} when indented
* key,value table comprehensions with { }