HomePhorge

(PUP-3786) Correct text length calculation of [] and {}
9d5c63a2e5dfUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3786) Correct text length calculation of [] and {}

The length of the source text associated with model elements is
important for error reporting and for the Puppet Strings documentation
tool. The grammar did not correctly produce the length of empty array
and hash expresses (they were always recorded with a length of 1).

This was caused by rules either referencing a non existant token, or by
only including the starting token in the calculation (which always leads
to a length of 1).

This commit changes the grammar's calls to associate length for the
erronous cases. Tests are also added.

Details

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPU9d5c63a2e5df: (PUP-3786) Correct text length calculation of [] and {} (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Jan 19 2015, 1:17 PM