def expand_commas(root)
      root.children.map! do |child|
        # child.parsed_rules.members.size > 1 iff the rule contains a comma
        unless child.is_a?(Tree::RuleNode) && child.parsed_rules.members.size > 1
          expand_commas(child) if child.is_a?(Tree::DirectiveNode)
          next child
        end
        child.parsed_rules.members.map do |seq|
          node = Tree::RuleNode.new([])
          node.parsed_rules = make_cseq(seq)
          node.children = child.children
          node
        end
      end
      root.children.flatten!
    end
def expand_commas(root)
      root.children.map! do |child|
        # child.parsed_rules.members.size > 1 iff the rule contains a comma
        unless child.is_a?(Tree::RuleNode) && child.parsed_rules.members.size > 1
          expand_commas(child) if child.is_a?(Tree::DirectiveNode)
          next child
        end
        child.parsed_rules.members.map do |seq|
          node = Tree::RuleNode.new([])
          node.parsed_rules = make_cseq(seq)
          node.children = child.children
          node
        end
      end
      root.children.flatten!
    end
Transform

     foo, bar, baz
       color: blue

 into

     foo
       color: blue
     bar
       color: blue
     baz
       color: blue

 @param root [Tree::Node] The parent node