summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/astarray.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/ast/astarray.rb')
-rw-r--r--lib/puppet/parser/ast/astarray.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/puppet/parser/ast/astarray.rb b/lib/puppet/parser/ast/astarray.rb
index f8f88b816..ab24fa86c 100644
--- a/lib/puppet/parser/ast/astarray.rb
+++ b/lib/puppet/parser/ast/astarray.rb
@@ -35,7 +35,24 @@ class Puppet::Parser::AST
definers = []
settors = []
others = []
+
+ # Make a new array, so we don't have to deal with the details of
+ # flattening and such
+ items = []
+
+ # First clean out any AST::ASTArrays
@children.each { |child|
+ if child.instance_of?(AST::ASTArray)
+ child.each do |ac|
+ items << ac
+ end
+ else
+ items << child
+ end
+ }
+
+ # Now sort them all according to the type of action
+ items.each { |child|
if definelist.include?(child.class)
definers << child
elsif setlist.include?(child.class)