clone method

  1. @override
MixinRulesetDirective clone()
override

Implementation

@override
MixinRulesetDirective clone() {
  var clonedArgs = <VarDefinition>[];
  for (var arg in definedArgs) {
    clonedArgs.add(arg.clone() as VarDefinition);
  }
  var clonedRulesets = <TreeNode>[];
  for (var ruleset in rulesets) {
    clonedRulesets.add(ruleset.clone());
  }
  return MixinRulesetDirective(
      name, clonedArgs, varArgs, clonedRulesets, span);
}