This issue outlines the tasks needed for a fully working tsuki compiler.
New features are not going to be added into the language until the first version of the compiler is finished, at which point features are going to be refined (along with the spec) and removed, but no new features are going to be added into the language.
Macros, which are currently TODO, are a 1.0 goal, but I need an overview of how the internal AST is going to look before I can implement them.
Lexer and tokens
[ ] #9
[x] Literals
[ ] #2
[x] Identifiers
[ ] #3
[x] Operators
Basic operations
[ ] Arithmetic
[x] Addition
[x] Subtraction
[x] Multiplication
[x] Division
[ ] Relation
[x] Equality and inequality ==, !=
[x] Order <, <=, >, >=
[ ] Logic
[x] not
[ ] and and or
[ ] Bitwise ops ~, &, |, ^^
[ ] Other
[ ] Concatenation ~
[ ] Compound assignment
[ ] in
[ ] is
[ ] as
[ ] Make operators use traits for overloading (mark this level's tasks as done as soon as this is introduced)
Control flow
[x] Prefix do expressions
[x] if expressions
[ ] if val
[ ] match expressions
[ ] try blocks and ? operator
[x] while loops
[ ] while val
[ ] for loops
[x] break expression
Functions
[x] Function definitions
[ ] Calls
[x] Intrinsic
[x] User-defined
[x] Self-recursive (fun a() calls itself)
[x] Mutually recursive (fun a() calls fun b() which calls fun a())
Check when method calls are supported
[x] return expression
Control flow analysis as to whether a function returns or not
Not needed. Because all functions that return a value treat the last expression in the body as the value to return, we can be sure that all functions that need to return a value, already do so.
[ ] :: compiler_intrinsic pragma
[ ] :: c_import pragma
[ ] :: c_varargs pragma
[ ] :: c_export pragma
[ ] Panicking
Types
[ ] #7
[ ] #6
[x] ()
[x] Bool
[x] NoReturn
[x] Integer types
[x] Floating point types
[ ] Char
[ ] Atoms
[ ] Tuples
[ ] Objects
[ ] Dropping
[ ] Unions
[ ] Optionals
[ ] Results
[ ] Pointers
[ ] Borrow checking
[ ] Array[N, T]
[ ] Seq[T]
[ ] Table[K, V]
[ ] String
[ ] rc and rc var
[ ] Type aliases
[ ] Implementations
[ ] Self
[ ] self with explicit type
[ ] self with pointer type inference
[ ] derives
[ ] Copy and Dup
Update this list when the list of traits that will be needed is known
Generics
[ ] Trait declarations
[ ] where constraints
[ ] Instantiation
Modules: TODO
Packages: TODO
FFI: TODO
Documentation: TODO
Macros: TODO
Do note that this roadmap does not include the standard library.
This issue outlines the tasks needed for a fully working tsuki compiler.
New features are not going to be added into the language until the first version of the compiler is finished, at which point features are going to be refined (along with the spec) and removed, but no new features are going to be added into the language.
Macros, which are currently TODO, are a 1.0 goal, but I need an overview of how the internal AST is going to look before I can implement them.
==
,!=
<
,<=
,>
,>=
not
and
andor
~
,&
,|
,^^
~
in
is
as
do
expressionsif
expressionsif val
match
expressionstry
blocks and?
operatorwhile
loopswhile val
for
loopsbreak
expressionfun a()
calls itself)fun a()
callsfun b()
which callsfun a()
)return
expressionControl flow analysis as to whether a function returns or notNot needed. Because all functions that return a value treat the last expression in the body as the value to return, we can be sure that all functions that need to return a value, already do so.:: compiler_intrinsic
pragma:: c_import
pragma:: c_varargs
pragma:: c_export
pragma()
Bool
NoReturn
Char
Array[N, T]
Seq[T]
Table[K, V]
String
rc
andrc var
Self
self
with explicit typeself
with pointer type inferencederive
sCopy
andDup
where
constraintsDo note that this roadmap does not include the standard library.