-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
Description
In reviewing #311, I found that getLiteral and getSelectorExpression are just very confusing.
For one, getLiteral doesn't do what it says, but then it also returns, in order, a ref, a ref, a literal, a ref and finally a literal again. Trying to find out what that code actually returns, and what of that's left over at which point in getSelectorExpression ... took me a while.
My ad-hoc proposal is to just rip out getLiteral entirely, and fold it in to getSelectorExpression.
I'd expect the code to be easier to read, in particular if we'd add a comment or two.
And we don't need to figure out a name for getLiteral if we'd keep it and make it do literals and non-literals in order.
stasm