kmcallister / glassful

Rust-like syntax for OpenGL Shading Language
Apache License 2.0
171 stars 14 forks source link

Write a new parser? #9

Open kmcallister opened 9 years ago

kmcallister commented 9 years ago

We only support a tiny subset of Rust. It could be nice to have a 100 line grammar for shader programs instead of the grammar being the 6,000 line Rust parser + a pile of ad-hoc restrictions.

We could also make small changes to the syntax, e.g. removing the mandatory initializers on statics. As long as the tokens are compatible with Rust, the macro re-parses from source anyway.

Using the actual libsyntax parser was mostly a hack to get the proof of concept done in one day :P