Rename cellRefCache to cellRefHolder because the use of the word cache indicate that it is for speeding-up some kind of operation, but in reality it is necessary due to the nature of the structure of the ExpressionHandler and math JS.
I change move ExpressionHandler initialization to resolveCell instead of sheet constructor, the reason is that the field cellRefHolder is operation scoped meaning that it needed to be cleared in evaluate which feels semantically incorrect. Another reason is that ExpressionHandler didn't even feel like part of a sheet because it is not holding any information and just a class that encapsulate certain functions.
Some important things to note:
cellRefCache
tocellRefHolder
because the use of the wordcache
indicate that it is for speeding-up some kind of operation, but in reality it is necessary due to the nature of the structure of theExpressionHandler
and math JS.ExpressionHandler
initialization toresolveCell
instead ofsheet
constructor, the reason is that the fieldcellRefHolder
is operation scoped meaning that it needed to be cleared inevaluate
which feels semantically incorrect. Another reason is thatExpressionHandler
didn't even feel like part of asheet
because it is not holding any information and just a class that encapsulate certain functions.