Tx aims to be oriented towards safety, speed, power and minimalism.
Tx is inspired by Lua. The code and implementation is based on the book Crafting Interpreters by Robert Nystrom. The syntax and feature set are inspired by languages such as Python, Rust, Wren and Swift among others.
The code is written, as much as possible, in modern C++. Trying to be almost completely constexpr.
Tx is still very much a work in progress.
- Do not allow forward decl 2x the same var
- Allow return as last statement of block that does not return nil
- Replace gsl Expect macro to something less likely to collide
- Maybe add option to error_token to mark the end of the token or the start in error message hint
- Tests for all the error_token() code paths
- Multi-line entry in REPL
- Fix error in REPL in entry that follows an error
- Support expression result in REPL
- Reserve keywords pub, with, type, Type, abstract, override, final
- Better float formatting: 1.0e20 instead of 1.e20. Test print/parse loop
- Check arity/signature of native fn
- Fix TODOs in the code
- Replace runtime errors by compile time (keep runtime error in degug)
- Go over all the tests one more time (Some do not make much sense for tx and some others do not test all code paths)
- Sync GC and allocator, meaning the GC is always triggered before the pool allocator falls-back to the upstream allocator.
- Chapter 25 challenges
- Chapter 26 challenges
- Allow "var a = a;" in the case of shadowing and not assigning to self
- Option to set maximum recursion level, starting stack and frame array size, and minimum memory consumption (do not round to next power of 2)
- Optimize instruction_prt access (chapter 24 challenge) + benchmark
- Allow function overload with diff arities (if possible)
- Universal Function Call (UFC)
- Add OP CODES for common constant values (0,1,2,-1,"")
- Clean up utf8 conv, utf8 lenght, resize once
- Loop/block labels with support in break and continue
- Allow to use break to break out of a block (using labels only)
- Better const correctness for container elements
- Use char8_t and u8string_view (needs libfmt support)
- Bytecode array
- Interpret bytecode
- Scanning tokens
- Parsing/compiling expressions
- Value types
- String
- Hash table
- Global variables
- Local variables
- Jumping
- Functions and call
- Tests
- Closure
- Garbage collection
- Backlog/FIXMEs/TODOs
- CI, coverage, fuzzing, ...
- Type checking
- Documentation
- Struct and instances
- Methods and initializer
- Traits
- Inheritance?
- String concatenation
- String interpolation
- Array and Map values (generic types)
- Tuples (need variadic generic types)
- Range based for loop
- Pattern matching
- Documentation
- Modules
- Optimizations
- Documentation
- Final syntax/grammar
- Reserve all future keywords
- Benchmarks
- Editors support (LSP)
- Modules for core and std
- Type alias
- Recursive types
- Documentation
- Syntax highlighting and completion in REPL
- Fibers
- Threads
- Async and await
- Add 'with' statement
- Package/dependency manager
- Tools (debugger, ...)
- Virtual env
- Refactor instruction set/Switch to register based VM
- Better GC
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.