Details
Description
Square brackets that are:
- Inside heredocs
- Inside an interpolation
Are sometimes being incorrectly lexed as TOKEN_LISTSTART.
Simplest example
Create test.pp:
$xxxxxxx = @("END")
|
${facts['os']['family']}
|
XXXXXXX XXX
|
END
|
notice($xxxxxxx)
|
Puppet apply it.
What I expect
Some text to appear showing the OS family.
What I actually see
Error: Could not parse for environment production: Syntax error at '[' (file: /Users/alexharvey/git/home/puppet-test/test.pp, line: 2, column: 14)
|
More info
Note the space inside XXX XX. That space is matching in the lexer on this line here, leading to the '[' being lexed as TOKEN_LISTSTART.
Attachments
Issue Links
- relates to
-
PUP-9306 Regression in heredoc parser in 5.5.8
-
- Closed
-