lastDeclaration method

Node lastDeclaration ()

Returns the last Declaration node in rules example: bar: @return[]; where '[]' is the last declaration

Implementation

Node lastDeclaration() {
  for (int i = rules.length; i > 0; i--) {
    final Node decl = rules[i - 1];
    if (decl is Declaration) return parseValue(decl);
  }
  return null;

// 3.5.0.beta.6 20180704
//  Ruleset.prototype.lastDeclaration = function () {
//      for (var i = this.rules.length; i > 0; i--) {
//          var decl = this.rules[i - 1];
//          if (decl instanceof Declaration) {
//              return this.parseValue(decl);
//          }
//      }
//  };
}