I'm trying to extend expressions for a new data type. The calculation of the Expressions like the PlusExpression should be done by an external library.
This means for a statement like
mytype a = b + c * d
I would need to to transform the AST to something like:
library_multi(c, d, t1);
library_add(b, t1, t2);
So I would have to insert new statements for each expression into the statementlist above the Variable Declaration statement.
I can't use objects since I'm trying to do this in mbeddr c.
What would be a good approach to do this? (or is this even a good idea?)