summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/scope.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index e5d7df7ca..ef5e9b003 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -568,7 +568,14 @@ class Puppet::Parser::Scope
when '$'
out << '$'
else
- Puppet.warning "Unrecognised escape sequence '#{ss.matched}'"
+ str = "Unrecognised escape sequence '#{ss.matched}'"
+ if file
+ str += " in file %s" % file
+ end
+ if line
+ str += " at line %s" % line
+ end
+ Puppet.warning str
out << ss.matched
end
elsif ss.scan(/^\$/)