Check for desugaring strategy
On this moment layout preservation works reasonably well for analysed trees.
However, some assumptions are made on the desugar strategy.
In case the assumptions are not true, text reconstruction fails or (even worse) gives a semantically changed result.
It seems useful to implement an analysis to detect these problems.
This analysis can be done on the desugared tree ech time a refactoring is triggered (at least in development mode)Errors:
- 1:n desugaring, example: /s -> []/ => ({s: s -> []})
- global info in desugared node, example: Var(x) => Var(QID(module-name,x))Warnings:
- origin lostInfo:
- desugared-origin relationsIn case the desugar strategy does not fulfill the requirements, a resugar rule given as a parameter to lo preservation fixes the problem. This must be suggested to the language developer.
Submitted by Maartje on 6 October 2011 at 10:36