From: Andre B. <and...@gm...> - 2002-12-27 10:40:33
|
There're just two things that are left to be done for the InlineTemp refactoring. Both of them need an improvement in expression parsing I'm currently thinking about. The two things are: - detect assignments to a temporary variable - find out if the initializer expression consists of one or more elements (in case of more elements I need to add braces when inlining the expression) For both things I need some more details on the operations in the expression. I'm currently thinking of some ExpressionOperationMutator which splits an expression into it's highest level operation. Unfortunatly this splitting isn't so easy since it needs to know about all kinds of operators and their level. we all known: "*a = 10;" splits into "*a" and "10". The ExpressionOperationMutator can build upon the ExpressionMutator which has the tokenizer implemented. Another question is, how to present this in the AST. My suggestion would be to keep that "expression"-ASTNode and add different Operation-Properties. I'm open for discussion, since this seems to be a thing that will influence many other refactoring and codegen functionality. -- Andre |