Add breakpoint to registry

@param {object} rule - AtRule
356034
function addToRegistry(rule) {
		let name = rule.name;

		if (registry.hasOwnProperty(name)) {
			// `each` allows for safe looping while modifying the
			// array being looped over. `append` is removing the rule
			// from the array being looped over, so it is necessary
			// to use this method instead of forEach 
			rule.each(r => registry[name].append(r));
		} else {
			registry[name] = rule.clone();
		}
	}
446403
function processRule (rule) {
  pre: {
    if (typeof rule !== 'function' && typeof rule !== 'string') {
      (Array.isArray(rule) && rule[0]) || rule.name, "Validator name must be specified.";
    }
  }
  main: {
    if (typeof rule === 'string') {
      return exports.create(rule);
    }
    else if (typeof rule === 'function') {
      return new exports.Validator({
        validate: rule
      });
    }
    else if (Array.isArray(rule)) {
      return exports.create.apply(exports, rule);
    }
    else {
      return exports.create(rule.name, rule);
    }
  }
  post: {
    __result instanceof exports.Validator;
  }
}
1032249
public void generateAttack(Event triggerEvent, Rule rule) {
		logger.info("Attack generated on rule: " + rule.getGuid() + ", by user: " + triggerEvent.getUser().getUsername());

		Attack attack = new Attack().
			setUser(new User(triggerEvent.getUser().getUsername())).
			setRule(rule).
			setTimestamp(triggerEvent.getTimestamp()).
			setDetectionSystem(triggerEvent.getDetectionSystem()).
			setResource(triggerEvent.getResource());

		appSensorServer.getAttackStore().addAttack(attack);
	}
1261958
function(rule){
    rule = basis.getter(rule || $true);

    if (this.rule !== rule)
    {
      var oldRule = this.rule;

      this.rule = rule;
      this.emit_ruleChanged(oldRule);

      /** @cut */ basis.dev.patchInfo(this, 'sourceInfo', {
      /** @cut */   transform: this.rule
      /** @cut */ });

      return this.applyRule();
    }
  }
496371
function modifyOutRule(rule, type) {
	rule.test = new RegExp(
		'\\.(' + Config.out[type].extensions.join('|') + ')$'
	);
}
181449
function _watchRuleFile(file, callback){
  fs.watchFile(file, function(curr, prev){
    log.warn('The rule file has been modified!');
    callback();
  });
}
359028
def rule(self, key):
        """"""
        def register(f):
            self.rules[key] = f
            return f
        return register
1314785
function replaceRules (rules) {
    // create new non global instance
    var accessControl = new ImmutableAccessControl({global: false})
    // set default rules from current instance
    accessControl.setRules(this.defaultRules)
    // set new rules
    accessControl.setRules(rules)
    // replace local rules
    this.rules = accessControl.rules
    // clear rule id
    this.id = undefined
}
1091693
function processRule(node, item, list) {
    var selectors = node.prelude.children;
    var declarations = node.block.children;
    var nodeCompareMarker = selectors.first().compareMarker;
    var skippedCompareMarkers = {};

    list.nextUntil(item.next, function(next, nextItem) {
        // skip non-ruleset node if safe
        if (next.type !== 'Rule') {
            return utils.unsafeToSkipNode.call(selectors, next);
        }

        if (node.pseudoSignature !== next.pseudoSignature) {
            return true;
        }

        var nextFirstSelector = next.prelude.children.head;
        var nextDeclarations = next.block.children;
        var nextCompareMarker = nextFirstSelector.data.compareMarker;

        // if next ruleset has same marked as one of skipped then stop joining
        if (nextCompareMarker in skippedCompareMarkers) {
            return true;
        }

        // try to join by selectors
        if (selectors.head === selectors.tail) {
            if (selectors.first().id === nextFirstSelector.data.id) {
                declarations.appendList(nextDeclarations);
                list.remove(nextItem);
                return;
            }
        }

        // try to join by properties
        if (utils.isEqualDeclarations(declarations, nextDeclarations)) {
            var nextStr = nextFirstSelector.data.id;

            selectors.some(function(data, item) {
                var curStr = data.id;

                if (nextStr < curStr) {
                    selectors.insert(nextFirstSelector, item);
                    return true;
                }

                if (!item.next) {
                    selectors.insert(nextFirstSelector);
                    return true;
                }
            });

            list.remove(nextItem);
            return;
        }

        // go to next ruleset if current one can be skipped (has no equal specificity nor element selector)
        if (nextCompareMarker === nodeCompareMarker) {
            return true;
        }

        skippedCompareMarkers[nextCompareMarker] = true;
    });
}
391505
function(newCallFrames, details, asyncStackTrace)
    {
        // FIXME: declare this property in protocol and in JavaScript.
        if (details && details["stack_update_needs_step_in"])
            this.stepInto();
        else if (newCallFrames && newCallFrames.length)
            this._pausedScript(newCallFrames, this._debuggerPausedDetails.reason, this._debuggerPausedDetails.auxData, this._debuggerPausedDetails.breakpointIds, asyncStackTrace);
    }
636529
def _at_debug(self, calculator, rule, scope, block):
        
        setting = block.argument.strip()
        if setting.lower() in ('1', 'true', 't', 'yes', 'y', 'on'):
            setting = True
        elif setting.lower() in ('0', 'false', 'f', 'no', 'n', 'off', 'undefined'):
            setting = False
        self.ignore_parse_errors = setting
        log.info("Debug mode is %s", 'On' if self.ignore_parse_errors else 'Off')
353255
private function checkAndRegisterTagMinimumCounts(): void
    {
        $checkedRule = 'min';
        $rulesWithReq = $this->getRulesWithRequirement($checkedRule);

        array_walk(
            $rulesWithReq,
            function (array $tagRule, string $tag) use ($checkedRule): void {
                $minCount = $tagRule[$checkedRule];
                $tagCount = count($this->findTokensForTag($tag));

                if ($minCount > $tagCount) {
                    $fixCallback = $this->hasFixCallback($checkedRule, $tag);
                    $method = $fixCallback ? 'addFixableError' : 'addError';
                    $fixable = $this->file->{$method}(
                        self::MESSAGE_TAG_OCCURRENCE_MIN,
                        $this->getDocCommentPos(),
                        // We use an error code containing the tag name because we can't configure this rules from the
                        // outside and need  specific code to exclude the rule for this special tag.
                        static::CODE_TAG_OCCURRENCE_MIN_PREFIX . ucfirst($tag),
                        [
                            $tag,
                            $minCount,
                            $tagCount
                        ]
                    );

                    if ($fixable && $fixCallback) {
                        $this->{$fixCallback}($this->getDocCommentPos(), $minCount, $tagCount, $tag);
                    }
                }
            }
        );
    }
1156366
public function setupRules()
    {
        $this->rules->addMany([
            'tag.open'  => [
                new OpenRule(new RegexMatcher('/(<[\w\.-]+)[:\/>:\s]/')),
                new CloseRule(new SubStringMatcher('>'), ['context' => ['!string', '!comment']])
            ],
            'tag.close' => new Rule(new RegexMatcher('/(<\/' . self::IDENTIFIER . '>)/')),

            'symbol.tag' => new Rule(new RegexMatcher('/<\\/?' . self::IDENTIFIER . '/', [
                'name'      => Token::NAME,
                'namespace' => '$.namespace'
            ]), ['context' => ['tag', '!string']]),

            'symbol.attribute' => new Rule(new RegexMatcher('/' . self::IDENTIFIER . '=/', [
                'name'      => Token::NAME,
                'namespace' => '$.namespace'
            ]), ['context' => ['tag', '!string']]),

            'constant.entity' => new Rule(new RegexMatcher('/(&(?:\#\d+|[a-z])+;)/si')),

            'comment' => new Rule(new CommentMatcher(null, [['<!--', '-->']])),
            'string'  => CommonFeatures::strings(['single' => '\'', 'double' => '"'], ['context' => ['tag']]),
        ]);
    }
1259931
function( rule ) {
    var exports = {};

    if ( !rule.match( regexp.URLS ) ) {
        return false;
    }

    if ( ! ( this instanceof UrlsHelper ) ) {
        return new UrlsHelper( rule );
    }

    this._originalRule = rule;
    this._helpers = [];
    this.URIS = [];

    rule.match( regexp.URLS ).forEach( function( url ) {
        var urlHelper = new UrlHelper( url );

        this._helpers.push( urlHelper );
        this.URIS.push( urlHelper.URI );
    }, this );

    exports.URIS            = this.URIS;
    exports.getOriginalURIS = this.getOriginalURIS.bind( this );
    exports.getModifiedRule = this.getModifiedRule.bind( this );
    exports.getOriginalRule = this.getOriginalRule.bind( this );

    return exports;
}
1101211
function addRules(rules) {
        _.each(rules, function (rule) {
            _global.rules[rule.id] = rule;
        });
    }
1056948
def add(self, rule: 'functions.ReplacementRule') -> None:
        
        self.matcher.add(rule.pattern, rule.replacement)
952461
def _addRule(self, isWhitelist, rule):
    """"""
    if isinstance(rule, six.string_types) or hasattr(rule, '__call__'):
      self.rules.append((isWhitelist, rule))
    else:
      raise TypeError('Graphite logging rules must be glob pattern or callable. Invalid: %r' % rule)