imaginary icon indicating copy to clipboard operation
imaginary copied to clipboard

There are unnecessary "White()" tokens in the pyparsing expressions for actions

Open exarkun opened this issue 5 years ago • 0 comments

By default pyparsing skips over all leading whitespace before attempting to match the next element in an expression. Thus, all of the explicit White() terms in our action definitions are redundant. We can just delete them.

Naively doing so does introduce an ambiguity between Take and TakeFrom but these should be one action anyway so I'm also going to take the excuse to merge them. This shortens the implementation and fixes some divergences between the two in some exception handling behavior.

exarkun avatar Nov 29 '20 16:11 exarkun