wdas / SeExpr

SeExpr is an embeddable, arithmetic expression language that enables flexible artistic control and customization in creating computer graphics images. Example uses include procedural geometry synthesis, image synthesis, simulation control, crowd animation, and geometry deformation. https://wdas.github.io/SeExpr
https://www.disneyanimation.com/open-source/seexpr/
Other
406 stars 86 forks source link

string nodes's special characters unescaping in the interpreter #94

Closed ix-dcourtois closed 5 years ago

ix-dcourtois commented 5 years ago

Currently when you create the following expression "\"hello\"" the result will be \"hello\" instead of "hello" as we would expect.

This pull request fixes this by unescaping the most common special sequences in ExprStrNode instances (both in LLVM codegen and the interpreter) I also added a small unit test, but I'm on Windows and I couldn't run them, so I hope it will pass ^^'

Note: I'm not sure if this is the best way of doing this, so don't hesitate to comment the pull request, tell me if I need to redo some parts, etc.

Regards, Damien.