DEV Community

Adam Crockett
Adam Crockett

Posted on

Rust log: chapter two, it's finally clicked!

Whilst still fighting the compiler I managed to write a parser that reverse parses a subset of JavaScript.

I had spent a long time looking at parser theory and rust frameworks but in the end I just said screw it I will write something that makes sense to me for this project. I'm building a token stream with callbacks, I was inspired by Marpa parser over peg grammer and so it's looking like Marpa as a parser combinator.

The idea is to mix JavaScript and CSS into one file, you might remember my Jess post on JavaScript enhanced mixins in scss, I am building the libjess for the cli compiler then a reactive VM for wasm later. It's been a headache and great fun. IL update you when I get further.

Top comments (0)