def parse(self, token_parser: TokenParser) -> FilesMatcherSdv: matcher = self._integer_matcher_parser.parse_from_token_parser( token_parser) return property_matcher.PropertyMatcherSdv( matcher, property_getters.sdv_of_constant_primitive(_PropertyGetter()), property_matcher_describers.GetterWithMatcherAsChild())
def glob_pattern_sdv(property_getter: PropertyGetter[FileMatcherModel, Path], glob_pattern: StringSdv) -> FileMatcherSdv: return property_matcher.PropertyMatcherSdv( matches_glob_pattern.sdv__path(glob_pattern), property_getters.sdv_of_constant_primitive(property_getter, ), property_matcher_describers.GetterWithMatcherAsDetail(), )
def reg_ex_sdv(property_getter: PropertyGetter[FileMatcherModel, str], regex: RegexSdv) -> FileMatcherSdv: return property_matcher.PropertyMatcherSdv( matches_regex.MatchesRegexSdv(regex, False), property_getters.sdv_of_constant_primitive(property_getter, ), property_matcher_describers.GetterWithMatcherAsDetail(), )
def matcher(configuration: Configuration, selector: FileMatcherSdv, matcher_on_result: FilesMatcherSdv) -> FilesMatcherSdv: return property_matcher.PropertyMatcherSdv( matcher_on_result, _PrunedModelGetterSdv(configuration, selector), property_matcher_describers.GetterWithMatcherAsChild(), )
def parse_line_number(parser: TokenParser) -> LineMatcherSdv: integer_matcher = _MATCHER_PARSER.parse_from_token_parser(parser) return property_matcher.PropertyMatcherSdv( integer_matcher, _operand_from_model_sdv(), property_matcher_describers.GetterWithMatcherAsChild(), _get_int_interval_of_int_matcher, )
def sdv(matcher: MatcherSdv[int]) -> StringMatcherSdv: return property_matcher.PropertyMatcherSdv( matcher, _operand_from_model_sdv(), property_matcher_describers.GetterWithMatcherAsChild() )