8 Commits

Author SHA1 Message Date
cron
0f8dd9c7f3 turtle/tlang: add forever and some other builtins
With forever, break, and (basic) if for and while can be made.
2021-08-28 23:12:29 -05:00
cron
93881793cf turtle/tlang: add comments, fix strings
Strings support '' syntax now. They can also be started with ' and ended with " or vice versa, and there is no way to put a literal ' in yet.
2021-08-28 23:12:29 -05:00
cron
d791294319 turtle/tlang: add run builtin
This changes how code is executed a bit, code from the stack is popped to an execution stack before.
This makes global executed functions and anonymous ones identical.
Not super well tested as always :]
2021-08-28 23:12:29 -05:00
cron
73d9e30816 turtle/tlang: fix lexer whitespace issues
This fixes the final whitespace issue as well as numbers requiring a final whitespace.
Maps don't need surrounding whitespace anymore.
2021-08-28 23:12:29 -05:00
cron
7f09824e89 turtle: add working tlang
Not very well tested, needs a better public API, not integrated with Minetest, ...
This is WAY bigger than a commit should be.
The next stages will be:
- unit tests
- API (allows it to be more than just a language for this project)
- integration with Minetest
2021-08-28 23:01:49 -05:00
cron
2fc69991b0 turtle: some weird ideas before the turtle language is added 2021-08-28 23:01:49 -05:00
cron
1abd79b524 turtle: add preliminary scheduling system 2021-08-28 23:01:08 -05:00
cron
96861cbe4f turtle: initial turtle mod
Don't use turtle.quarry or the mining features, they are experimental
2021-08-28 23:01:08 -05:00