forked from puppetlabs/puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PUP-2288) Make [ be LISTSTART if first in file or preceded by WS
The problem was that there was only one special case being handled by the lexer to dis-ambiguate if an expression followed by [ meant the start of an access operations (e.g. getting an entry out of an array), or if it represented the start of a literal array. The supported special case was NAME followed by non-WS followed by [. This meant that cases like foo(3) [a,b,c] were always treated as an access operation. The fix generalizes the dis-ambiguation so that all access operations must be written without interleaved WS.
- Loading branch information
Showing
2 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters