run method

  1. @override
Ruleset run(
  1. Ruleset root
)
override

Implementation

@override
Ruleset run(Ruleset root) {
  final extendFinder = ExtendFinderVisitor();
  Ruleset newRoot;

  extendIndices = <String, bool>{};
  extendFinder.run(root);
  if (!extendFinder.foundExtends) return root;

  root.allExtends = root.allExtends.sublist(0)
    ..addAll(doExtendChaining(root.allExtends, root.allExtends));
  allExtendsStack = <List<Extend>>[root.allExtends];
  newRoot = _visitor.visit(root);
  checkExtendsForNonMatched(root.allExtends);

  return newRoot;

//2.6.1 20160401
// run: function(root) {
//     var extendFinder = new ExtendFinderVisitor();
//     this.extendIndices = {};
//     extendFinder.run(root);
//     if (!extendFinder.foundExtends) { return root; }
//     root.allExtends = root.allExtends.concat(this.doExtendChaining(root.allExtends, root.allExtends));
//     this.allExtendsStack = [root.allExtends];
//     var newRoot = this._visitor.visit(root);
//     this.checkExtendsForNonMatched(root.allExtends);
//     return newRoot;
// },
}