nicklockwood / Expression

A cross-platform Swift library for evaluating mathematical expressions at runtime
MIT License
829 stars 51 forks source link

Expose AST #36

Open wilg opened 2 years ago

wilg commented 2 years ago

Not a super pressing need, but it would be kind of fun if the AST was exposed (I believe subexpression is fileprivate right now). We're using this library for procedurally generating textures, so we need all the performance we can get. We were thinking of writing a little compiler that will compile the expression to Swift code, or maybe to shader code. Thanks for the library!

nicklockwood commented 2 years ago

Sounds awesome. Feel free to open a PR that makes the parts you need public. The main reason I didn't make them public originally was so I could evolve the library without breaking changes, but it's been stable for a while now.