123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- goog.provide('goog.dom.pattern.AllChildren');
- goog.require('goog.dom.pattern.AbstractPattern');
- goog.require('goog.dom.pattern.MatchType');
- goog.dom.pattern.AllChildren = function() {
-
- this.depth_ = 0;
- };
- goog.inherits(goog.dom.pattern.AllChildren, goog.dom.pattern.AbstractPattern);
- goog.dom.pattern.AllChildren.prototype.matchToken = function(token, type) {
- this.depth_ += type;
- if (this.depth_ >= 0) {
- return goog.dom.pattern.MatchType.MATCHING;
- } else {
- this.depth_ = 0;
- return goog.dom.pattern.MatchType.BACKTRACK_MATCH;
- }
- };
- goog.dom.pattern.AllChildren.prototype.reset = function() {
- this.depth_ = 0;
- };
|