It looks like there are a bunch of places finalType(top) is used, sometimes even being inlined or assigned to multiple locals in different grammars. This seems like a common enough need that it might make sense to put it as an aspect default top::Expr { top.finalType = finalType(top); }, and refactor all those calls to demand it instead of repeating the computation.
It looks like there are a bunch of places
finalType(top)
is used, sometimes even being inlined or assigned to multiple locals in different grammars. This seems like a common enough need that it might make sense to put it as anaspect default top::Expr { top.finalType = finalType(top); }
, and refactor all those calls to demand it instead of repeating the computation.