private void surroundPropertyGroups() {
while (!_propertyGroups.empty()) {
PropertyGroup group = _propertyGroups.pop();
// Construct a simple rule set using the parent's selector
RuleSetNode propertyRuleSet = new RuleSetNode();
propertyRuleSet.addChild(NodeTreeUtils.filterLineBreaks(_parentSelectorGroup.clone()));
// Move all the properties into this new rule set
List<Node> propertyNodes = new ArrayList<Node>(_parentScope.getChildren().subList(group.getStart(), group.getEnd() + 1));
propertyRuleSet.addChild(new ScopeNode(propertyNodes));
// Insert the property rule set
_parentScope.addChild(group.getStart(), propertyRuleSet);
}
}