pocketlang/docs/TODO.txt

96 lines
2.9 KiB
Plaintext
Raw Normal View History

2021-02-17 02:28:03 +08:00
// To implement.
2021-06-07 13:54:06 +08:00
2021-06-11 15:46:55 +08:00
- Refactor fiber into a module and is_done as an attribute.
2021-06-13 04:17:44 +08:00
- def f(x)
f(x) ## not tco, unless return f(x)
end
if a function's last statement is a call, we can perform tco.
2021-06-15 00:20:07 +08:00
- implement 'lang.getMaxCallDepth()' (default=1000 like python) and
setMaxCallDepth(val) to change stack size at runtime.
- Recursive call to anonymous functions. use 'this' keyword
2021-06-13 04:17:44 +08:00
2021-06-11 15:46:55 +08:00
- move moduleAddGlobalInternal() to var.h (also other var functions).
2021-06-07 13:54:06 +08:00
- refactor build.bat batch script to powershell
refactor makefile and setup a github action.
- Hex, binary literals and floats like ".5".
2021-06-07 13:54:06 +08:00
- change or add => to_string() to value.as_string
and add as_repr, as_bool.
- Make bool and num are incompatible (also it increase performance a bit).
1 + true - make it not allowed.
2021-06-07 13:54:06 +08:00
- support new line just after '=' (and other places)
2021-06-12 14:56:09 +08:00
- literal function recursive call.
func(a, b)
self(a, b) // Something like this.
end
- Implement argparse.
- -v --version
- emit opcodes
- maybe write a similar .pyc file for pocket
- --docs to generate docs from cstring.
- dump compiled code to a file.
- In keyword.
- Structs (maybe enums).
- Implement file IO (require structs).
- Implement utf8 support.
- Implement gdb like debugger (add color print for readability).
- Initialize imported scripts (require fiber based vm).
- Complete all the TODO; macros.
2021-06-08 00:56:56 +08:00
- implement MAX_ARGC checks (would cause a buffer overflow if not)
when compiling and calling a function (also in fibers).
// Low priority.
- Ignore line with '\' character.
- Make it possible to override function names.
2021-05-20 22:05:57 +08:00
- To do so the functions and global variables should be in the same
buffer as the property of the script.
- Function docstring property.
- Union tagging alter in var.
- Github actions.
// Add more.
- Single header for embedding (script in pk, require file IO).
2021-06-09 18:42:26 +08:00
- Complete core methods.
- Complete var methods.
- Complete core functions.
- Complete builtin operators.
- Complete opcodes.
- Complete core libs.
- Complete the docs.
- More Tests.
// Enhancements
- Write a custom hex() function to cast uint64_t to hex
string (currently our max is uint32_t) and for binary
(C doesn't have a sprintf("%b", num) for us.
- Ensure that the bitwise operation result `a << b` can be fit
into a double value before casting it to one. and we're allowing
the integer overflow when shifting.
// Bugs.
It's at pre-alpha and every thing is left to
2021-06-05 22:47:59 +08:00
implement, and nothing would be work as expected.
- f = func print() end; print(f) # semicolon should be there.
def f() print() end print(f) # semicolon should be there.
make it okay to use semicolon freely like new lines.
- REPL error message should be the first one (not the last).
>>> def f()
... _f = func()
... _f() // _f not defined (no closure).
... end
Error: Expected an expression // expected Name '_f' not defined.