Skip to content

Latest commit

 

History

History
44 lines (40 loc) · 1.29 KB

File metadata and controls

44 lines (40 loc) · 1.29 KB

Astra - Compiler for a Swift-like language.

Motivation

I was thinking about a project like this for a long time and the language I will be making this in is Rust - in my eyes a very promising language to get into.
This project is an opportunity for me to learn Rust and Git usage at the same time, as well as prepare for internships and deepen the knowledge about compilers.

Usage

  1. Clone the repository
git clone https://github.com/norbertcygiert/AstraCompiler.git
cd AstraCompiler
  1. Build the project
cargo build
  1. Run the AstraScript (.astra) file
cargo run -- <filename>

For help use:

cargo run -- -h 

Roadmap

  • Lexer
  • Parser
  • Error reporting
  • Variables
  • Unary expressions
  • Conditional statements
  • "While" loops
  • Introduce AstraScript
  • Type checking
  • Functions
  • Full AstraScript language design
  • Transpiler (?)

References

Julian Hartl's "Bulding a compiler in Rust" playlist and "natrixcc" compiler collection

https://github.com/julian-hartl/natrixcc

Official Rust-Lang Documentation

https://doc.rust-lang.org/stable/std/