You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This first release should allow user to use variables (and constants) and basic operations (aka arithmetic). The whole code is in one file considered as a main. So user can write very basic scripts.
Please note that IO and files operation are not available, so the produced script is pretty limited. The return value of the script will be the last expression.
Parser written with Antlr4, it instanciates an abstract syntax tree. The parser grammar will consist of a list of expression (variable declaration, binary operation, assignation, ...).
Visitor pattern
Best way to use the AST for next parts is visitor pattern. We need a visitor 'library' to travel 🚀 accross the structure easily. This pattern need to be generic as much as possible to be used in different purpose.
User code cannot be fully trusted as good, it can contains error and they should be catched. So the AST must be validated. Using the previously created visitor structure we can check the whole structure.
Variables + types + operations
This first release should allow user to use variables (and constants) and basic operations (aka arithmetic). The whole code is in one file considered as a main. So user can write very basic scripts.
Please note that IO and files operation are not available, so the produced script is pretty limited. The return value of the script will be the last expression.
Task splitting
Create a basic executable which takes a file path as argument. It can also take some options to set verbose level, output file name, etc.
Parser written with Antlr4, it instanciates an abstract syntax tree. The parser grammar will consist of a list of expression (variable declaration, binary operation, assignation, ...).
Best way to use the AST for next parts is visitor pattern. We need a visitor 'library' to travel 🚀 accross the structure easily. This pattern need to be generic as much as possible to be used in different purpose.
User code cannot be fully trusted as good, it can contains error and they should be catched. So the AST must be validated. Using the previously created visitor structure we can check the whole structure.
AST should be parsed to LLVM IR. Then this representation can be used to render an object file which can be linked (ld) and then executed.
Introduce
new
keyword to be able tonew i32(25)
for example.Array initialization
[1, 2, 3]
and array accessmy_array[0]
Reminder: it's pretty evident, but all code produced to complete these tasks MUST be fully tested.
Other tasks
Package to debian and rpm at least. If possible add a docker image and a nixpkg
The text was updated successfully, but these errors were encountered: