Issue #1098 has been updated by luke.

Status changed from Accepted to Ready for Checkin
Assigned to changed from community to jamtur01
Affected version set to 0.24.4

Fixed in the tickets/0.24.x/1098 branch in my repo.
----------------------------------------
Bug #1098: Multiline strings throw off the lexer's line counting
http://projects.reductivelabs.com/issues/show/1098

Author: luke
Status: Ready for Checkin
Priority: Normal
Assigned to: jamtur01
Category: language
Target version: 0.25.0
Complexity: Easy
Patch: None
Affected version: 0.24.4
Keywords: 


The following code throws an exception on the wrong line because the 
<pre>slurpstring</pre> method in parser/lexer.rb does not account for multiline 
strings:
<pre>
#!/usr/bin/env puppet

$string = "this is a
test
and
a
failure"

[fun
</pre>
Results in:
<pre>
Could not parse for environment development: Syntax error at '['; expected ']' 
at /Users/luke/bin/test.pp:5
</pre>
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 <pre>\n</pre> 
characters embedded
 in strings.


----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to