Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix incorrect parsing of placeholders that point to other tab stops. #267
Description of the Change
#266 describes a regression with tab stop behavior when the placeholder contains a reference to another tab stop. This almost certainly happened as a result of #260, but there wasn't any test coverage for this particular usage.
The parser was incorrectly assuming that all the items it would receive for a particular rule would be represented as strings, and that it could thus join them all together. Tabstop references are represented as objects. So I wrote a couple of utility functions to ensure that adjacent strings would be merged together without incorrectly coercing objects.
If there's an easier way to do this with a PEG, I'm all for it. Parser grammars are not my strong suit.