Skip to content

(#21874) Make name[x] different from name [x]#2020

Closed
hlindberg wants to merge 1 commit intopuppetlabs:masterfrom
hlindberg:issues/issue-21874-name-at-function-confusion
Closed

(#21874) Make name[x] different from name [x]#2020
hlindberg wants to merge 1 commit intopuppetlabs:masterfrom
hlindberg:issues/issue-21874-name-at-function-confusion

Conversation

@hlindberg
Copy link
Contributor

The parser cannot differentiate between a call of function 'name' with
array as argument from deprecated resource reference (e.g. file['foo'])
since whitespace is not significant.

This is fixed by letting the lexer generate a separate token for a
LBRACK when it is preceded by a NAME and WS.

@puppetcla
Copy link

CLA signed by all contributors.

@zaphod42
Copy link
Contributor

zaphod42 commented Nov 8, 2013

@hlindberg I think this is liked to the wrong redmine issue. Can you double check that?

@zaphod42
Copy link
Contributor

zaphod42 commented Nov 8, 2013

Need some tests

@hlindberg
Copy link
Contributor Author

Doh, off by one error, it is #21874

@hlindberg
Copy link
Contributor Author

Tests added

The parser cannot differentiate between a call of function 'name' with
array as argument from deprecated resource reference (e.g. file['foo'])
since whitespace is not significant.

This is fixed by letting the lexer generate a separate token for a
LBRACK when it is preceded by a NAME and WS.
@hlindberg
Copy link
Contributor Author

Doh, and it failed on 1.8.7 string[] returning int as well. Updated.

@hlindberg
Copy link
Contributor Author

This PR is only meaningful in a 3.4.x release now that work has progressed on the future evaluator for 3.5 where the behavior is already implemented.

Keeping this open if there is the desire to include this, but then retargeted for stable and a maintenance release of 3.4

@hlindberg
Copy link
Contributor Author

Closing. This is fixed in the future parser/evaluator that is in master already. Not retargeting for maintenance release of Puppet 3.4.

@hlindberg hlindberg closed this Dec 14, 2013
@hlindberg hlindberg deleted the issues/issue-21874-name-at-function-confusion branch September 16, 2017 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants