Skip to content

ncphillips/toy-transpiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toy Transpiler

I made this transpiler while watching the Destroy All Software screencast A Compiler From Scratch.

Instead of following along in Ruby, I decided to follow along in Rust. Due to the nature of rust, This has lead to a few significantly different design decisions, but overall it works the same way.

Todo

  • Make token_kinds STATIC?
  • Better way to do sub-types of Token?

Development

Run

cargo run

Test

cargo test

A helpful command in vim:

:nmap <leader>t :w \| !clear && RUST_BACKTRACE=1 ncargo test<CR>

Then type ,t to run tests from inside vim.

Format Code

cargo fmt

Linter

cargo clippy

About

Written in Rust. Transpiles a Ruby-ish language to a Javascript-ish language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages