Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LiquidParser: Fix antlr warning about matching an empty string
antlr rightfully complains: "rule output contains an optional block with at least one alternative that can match an empty string" (which hints at a potential performance problem). This is due to "not_out_end" matching with "*" (which can yield an empty string), even though we already specify "?" at "unparsed=not_out_end?". Fix the parser grammar, and adjust two test cases where we actually tested for that undesired behavior. Also see https://stackoverflow.com/questions/26041293/antlr-4-warning-rule-contains-an-optional-block-with-at-least-one-alternative for an explanation. Regression introduced in bkiers#269
- Loading branch information