I'm building a compiler in Rust!!!

rust dev.to

Hi!
I'm new to this platform and I want to make my first post.

In these days, i'm writing my own compiler in Rust for a really simple custom language. The syntax is:

let x = 10;
print?("Hello, ");
println?(x);

let y = "Hi";

print?(y);
println?(" Thom");
Enter fullscreen mode Exit fullscreen mode

At the moment the variable declaration supports the u64 and the String type. The print?() are functions, but soon they'll become macro.

Now, I'm writing the codegen and I'm stuck becouse of Assembly. I have to learn it! Never mind. In a few days, I'll complete it.

Please, check the repository if you want (:

Stay tuned OvO

Source: dev.to

arrow_back Back to Tutorials