clone method

  1. @override
DocumentDirective clone()
override

Implementation

@override
DocumentDirective clone() {
  var clonedFunctions = <LiteralTerm>[];
  for (var function in functions) {
    clonedFunctions.add(function.clone());
  }
  var clonedGroupRuleBody = <TreeNode>[];
  for (var rule in groupRuleBody) {
    clonedGroupRuleBody.add(rule.clone());
  }
  return DocumentDirective(clonedFunctions, clonedGroupRuleBody, span);
}