You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are starting to have cops using the Regexp parser (like #8407).
I'd like to factorize that parsing.
It could be done in a shared module, maybe with a global registry of regexp to avoid parsing the same regexp many times, but I was thinking that another way would be a ParsedRegexp force that would do the parsing and call on_parsed_regexp for those cops that want to use it (2 right now). This would require that Forces to be allowed to respond to the same callbacks than cops at the same time though (so that on_parsed_regexp from the force and on_nth_ref from Commissionner are fired in the right alternance).
We have currently only a single Force in the builtin gem (VariableForce). It does it's own processing and wouldn't be affected as it uses process_rescue and not on_rescue. Other forces might. Are there other known examples? Is it worth keeping compatibility by defining a different Force::Base?
The text was updated successfully, but these errors were encountered:
We are starting to have cops using the Regexp parser (like #8407).
I'd like to factorize that parsing.
It could be done in a shared module, maybe with a global registry of regexp to avoid parsing the same regexp many times, but I was thinking that another way would be a
ParsedRegexp
force that would do the parsing and callon_parsed_regexp
for those cops that want to use it (2 right now). This would require that Forces to be allowed to respond to the same callbacks than cops at the same time though (so thaton_parsed_regexp
from the force andon_nth_ref
fromCommissionner
are fired in the right alternance).We have currently only a single
Force
in the builtin gem (VariableForce
). It does it's own processing and wouldn't be affected as it usesprocess_rescue
and noton_rescue
. Other forces might. Are there other known examples? Is it worth keeping compatibility by defining a differentForce::Base
?The text was updated successfully, but these errors were encountered: