diff options
Diffstat (limited to 'lib/puppet/parser/ast/leaf.rb')
-rw-r--r-- | lib/puppet/parser/ast/leaf.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast/leaf.rb b/lib/puppet/parser/ast/leaf.rb index 4ad1f9ff3..caf1d13a5 100644 --- a/lib/puppet/parser/ast/leaf.rb +++ b/lib/puppet/parser/ast/leaf.rb @@ -52,10 +52,8 @@ class Puppet::Parser::AST # The base string class. class String < AST::Leaf - # Interpolate the string looking for variables, and then return - # the result. def evaluate(scope) - return scope.strinterp(@value, file, line) + @value end def to_s @@ -74,6 +72,16 @@ class Puppet::Parser::AST end end + class Concat < AST::Leaf + def evaluate(scope) + @value.collect { |x| x.evaluate(scope) }.join + end + + def to_s + "concat(#{@value.join(',')})" + end + end + # The 'default' option on case statements and selectors. class Default < AST::Leaf; end |