Join the pieces of a pattern-matching function together.
480483
def join_match_funcdef(tokens):
    """"""
    if len(tokens) == 2:
        (func, insert_after_docstring), body = tokens
        docstring = None
    elif len(tokens) == 3:
        (func, insert_after_docstring), docstring, body = tokens
    else:
        raise CoconutInternalException("invalid docstring insertion tokens", tokens)
    # insert_after_docstring and body are their own self-contained suites, but we
    # expect them to both be one suite, so we have to join them together
    insert_after_docstring, dedent = split_trailing_indent(insert_after_docstring)
    indent, body = split_leading_indent(body)
    indentation = collapse_indents(dedent + indent)
    return (
        func
        + (docstring if docstring is not None else "")
        + insert_after_docstring
        + indentation
        + body
    )
601270
def _fn_matches(fn, glob):
    """"""
    if glob not in _pattern_cache:
        pattern = _pattern_cache[glob] = re.compile(fnmatch.translate(glob))
        return pattern.match(fn)
    return _pattern_cache[glob].match(fn)
22302
def split_pattern(self):
        """"""
        patterns = []
        for p in self.split_order:
            patterns.append('_{}%{}'.format(p.capitalize(), p))
        return ''.join(patterns)
154095
function linCombShift_(x, y, b, ys) {
  var i, c, k, kk;
  k=x.length<ys+y.length ? x.length : ys+y.length;
  kk=x.length;
  for (c=0, i=ys; i<k; i++) {
    c+=x[i]+b*y[i-ys];
    x[i]=c & mask;
    c>>=bpe;
  }
  for (i=k; c && i<kk; i++) {
    c+=x[i];
    x[i]=c & mask;
    c>>=bpe;
  }
}
649643
def match(pattern, data, **parse_kwargs):
    """"""
    return [m.value for m in parse(pattern, **parse_kwargs).find(data)]
1117444
def concat(self, operand, start=0, end=0, offset=0):
        """"""
        if not Gauged.map_concat(self.ptr, operand.ptr, start, end, offset):
            raise MemoryError
1217483
def match_patterns(pathname, patterns):
    """"""
    for pattern in patterns:
        if fnmatch(pathname, pattern):
            return True
    return False
599540
def join_path(a, *p):
    """"""
    path = a
    for b in p:
        if len(b) == 0:
            continue
        if b.startswith('/'):
            path += b[1:]
        elif path == '' or path.endswith('/'):
            path += b
        else:
            path += '/' + b
    # END for each path token to add
    return path
925186
function join(joiner, ...values) {
    if (values.length > 0) {
      return concat([],...values).join(joiner);
    }

    // Manually currying
    return (...values) => join(joiner, ...values);
  }
748434
def join(strings: Optional[Sequence[str]], separator: str = "") -> str:
    
    return separator.join(s for s in strings if s) if strings else ""
288961
def merge_from(self, other):
        """"""
        if other.national_number_pattern is not None:
            self.national_number_pattern = other.national_number_pattern
        if other.example_number is not None:
            self.example_number = other.example_number
1298370
def fnmatches(entry, *pattern_list):
    

    for pattern in pattern_list:
        if pattern and fnmatch(entry, pattern):
            return True
    return False
129069
def combine_or(matcher, *more_matchers):
    """"""

    def matcher(cause):
        for sub_matcher in itertools.chain([matcher], more_matchers):
            cause_cls = sub_matcher(cause)
            if cause_cls is not None:
                return cause_cls
        return None

    return matcher
75644
def join(self, glue=" "):
        
        j = glue.join([str(x) for x in self.obj])
        return self._wrap(j)
703299
def _join(segments):
    """"""
    new = []
    start = segments[0][0]
    end = segments[0][1]
    for i in range(len(segments)-1):
        if segments[i+1][0] != segments[i][1]:
            new.append((start, end))
            start = segments[i+1][0]
        end = segments[i+1][1]
    new.append((start, end))
    return new
1103724
def _combine(self, x, y):
    """"""
    if x is None or y is None:
      return x or y
    if x != y:
      raise ValueError('Incompatible set of constraints provided.')
    return x
1185828
def join(tokens, start, result):
    """"""
    texts = []
    if len(result) > 0:
        for e in result:
            for child in e.iter():
                if child.text is not None:
                    texts.append(child.text)
        return [E(result[0].tag, ' '.join(texts))]