Bug #1098
Multiline strings throw off the lexer's line counting
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | language | |||
| Target version: | 0.24.6 | |||
| Affected Puppet version: | 0.24.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
The following code throws an exception on the wrong line because the
slurpstringmethod in parser/lexer.rb does not account for multiline strings:
#!/usr/bin/env puppet $string = "this is a test and a failure" [fun
Results in:
Could not parse for environment development: Syntax error at '['; expected ']' at /Users/luke/bin/test.pp:5
The actual error is on line 9, but all of the carriage returns in the string are ignored by the line counter.
Note that any fix for this problem should correctly handle
\ncharacters embedded in strings.
History
Updated by Redmine Admin over 3 years ago
- Status changed from 1 to Accepted
Updated by Luke Kanies over 3 years ago
- Status changed from Accepted to Ready For Checkin
- Assignee changed from Puppet Community to James Turnbull
- Affected Puppet version set to 0.24.4
Fixed in the tickets/0.24.x/1098 branch in my repo.
Updated by James Turnbull over 3 years ago
- Status changed from Ready For Checkin to Closed
- Target version changed from 0.25.0 to 0.24.6
Pushed in commit:614326afdbe542c9d4c480df43631c1f3cfc394a in branch 0.24.x