Add moonscript scaffolding

This commit is contained in:
Christine Dodrill 2015-06-13 12:34:55 -07:00
parent 8115cd4f1b
commit be18a0a148
5 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/.tup
/bin
/lua

View File

@ -15,3 +15,5 @@ CFLAGS += -Werror
!gccgo = |> ^ GCCGo: %f -> Binary %o^ gccgo $(GOFLAGS) -o %o %f |>
!cc = |> ^ CC: %f -> Binary %o^ gcc $(CFLAGS) -o %o %f |>
!obj = |> ^ CC: %f -> Binary %o^ gcc $(CFLAGS) -c -o %o %f |>
!moon = |> ^ Moonscript: %f -> Script %o^ moonc -o %o %f && chmod u+x %o |>
!luascript = |> ^ Lua script: %f -> Script %o^ echo "#!/usr/bin/lua" >> %o && cat %f >> %o && chmod u+x %o |>

View File

@ -1,7 +1,6 @@
.gitignore
include_rules
: foreach *.moon |> moonc -o ../bin/%B.lua %f && chmod u+x ../bin/%B.lua |> ../bin/%B.lua
: foreach *.nim |> !nim |> ../bin/%B
: foreach *.go |> !gccgo |> ../bin/%B

6
src/moonscript/Tupfile Normal file
View File

@ -0,0 +1,6 @@
.gitignore
include_rules
: foreach *.moon |> !moon |> ../../lua/%B.lua
: ../../lua/free.lua |> !luascript |> ../../bin/free-moon

1
src/moonscript/free.moon Normal file
View File

@ -0,0 +1 @@
os.execute "free -m"