class JsRegex::Converter::AssertionConverter
Template class implementation.
Note the inheritance from GroupConverter
.
Private Instance Methods
Source
# File lib/js_regex/converter/assertion_converter.rb, line 14 def convert_data case subtype when :lookahead, :nlookahead keep_as_is when :lookbehind return keep_as_is if context.es_2018_or_higher? warn_of_unsupported_feature('lookbehind', min_target: Target::ES2018) build_passive_group when :nlookbehind return keep_as_is if context.es_2018_or_higher? warn_of_unsupported_feature('negative lookbehind', min_target: Target::ES2018) else warn_of_unsupported_feature end end
Source
# File lib/js_regex/converter/assertion_converter.rb, line 32 def keep_as_is build_group(head: pass_through, capturing: false) end