mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
moved compile2 -> compile + todo file
This commit is contained in:
parent
192df0ec08
commit
872df1e868
2
dump
2
dump
@ -3,7 +3,7 @@
|
||||
module("moonscript", package.seeall)
|
||||
|
||||
require "moonscript.parse"
|
||||
require "moonscript.compile2"
|
||||
require "moonscript.compile"
|
||||
require "moonscript.util"
|
||||
|
||||
require "alt_getopt"
|
||||
|
2
moon
2
moon
@ -3,7 +3,7 @@
|
||||
module("moonscript", package.seeall)
|
||||
|
||||
require "moonscript.parse"
|
||||
require "moonscript.compile2"
|
||||
require "moonscript.compile"
|
||||
require "moonscript.util"
|
||||
|
||||
require "alt_getopt"
|
||||
|
2
moonc
2
moonc
@ -3,7 +3,7 @@
|
||||
module("moonscript", package.seeall)
|
||||
|
||||
require "moonscript.parse"
|
||||
require "moonscript.compile2"
|
||||
require "moonscript.compile"
|
||||
require "moonscript.util"
|
||||
|
||||
require "alt_getopt"
|
||||
|
2
test.lua
2
test.lua
@ -9,7 +9,7 @@ pcall(function()
|
||||
end)
|
||||
|
||||
require "moonscript.parse"
|
||||
require "moonscript.compile2"
|
||||
require "moonscript.compile"
|
||||
local parse, compile = moonscript.parse, moonscript.compile
|
||||
|
||||
local opts, ind = alt_getopt.get_opts(arg, "qd:", { })
|
||||
|
49
todo
Normal file
49
todo
Normal file
@ -0,0 +1,49 @@
|
||||
# TODO
|
||||
|
||||
- add all lines through Block
|
||||
- add_line should only add one line at a time
|
||||
- add_block?
|
||||
|
||||
* issues with whitespace on the end of lines
|
||||
* default arguments
|
||||
* multiline comments
|
||||
* table slices
|
||||
* chains that don't end in funcall need tmp assignment
|
||||
* add a proper return statement
|
||||
* add continue keyword (ouch)
|
||||
* vim syntax file
|
||||
|
||||
* combine for and if line decorators
|
||||
|
||||
* elseif with value that inserts lines
|
||||
- need to decompose elif into if inside else
|
||||
|
||||
* export keyword, makes it so local is left off when variable is declared
|
||||
- or copies to global var when local already exists
|
||||
- or used for assignment to assign global var
|
||||
|
||||
|
||||
export a = -> "hello"
|
||||
|
||||
or
|
||||
|
||||
x = 232
|
||||
export x
|
||||
|
||||
or
|
||||
|
||||
export x
|
||||
x = 3434
|
||||
|
||||
|
||||
* these should work:
|
||||
|
||||
x = 5 + if something then 40 else 343
|
||||
|
||||
x =
|
||||
hello: if something 343 else 343
|
||||
|
||||
|
||||
* allow return anywhere in block
|
||||
* upercase constants and capital letter variables should automatically be exported (in the global scope?)
|
||||
|
Loading…
Reference in New Issue
Block a user