コード例 #1
0
    def __init__(self, func, pattern, step_type=None):
        matchers.Matcher.__init__(self, func, pattern, step_type)
        self.context_params = []
        self.signature = inspect.signature(func)

        pattern = self.convert(pattern)
        self.parser = cfparse.Parser(pattern, self.custom_types)
コード例 #2
0
 def __init__(self, name, *args, **kwargs):
     """Compile parse expression."""
     super(parse, self).__init__(name)
     self.parser = base_cfparse.Parser(self.name, *args, **kwargs)
コード例 #3
0
 def __init__(self, func, string, step_type=None):
     super(CFParseMatcher, self).__init__(func, string, step_type)
     self.parser = cfparse.Parser(self.string, self.custom_types)