stylist
stylist copied to clipboard
Look to efficient processing of files
At the moment each (tree) rule is passed the parse tree which it then pokes about in for its own purposes.
The concern is that this may become a performance issue as the number of rules increases. Is there a way to implement the rules as tree visitors. the tree would then be traversed in its entirety but only once with each rule doing what it needs to as it goes past.
On the other hand would this be complex and unwieldy with much too much state having to be maintained to allow the rules to reference back to previously seen nodes on the tree?