INNER CODE UNIT · Python

_FindAllMatches

hongliuliao/ehttp · deps/googletest/googlemock/scripts/gmock_doctor.py:137

def _FindAllMatches(regex, s):
  """Generates all matches of regex in string s."""

  r = re.compile(regex)
  return r.finditer(s)


def _GenericDiagnoser(short_name, long_name, diagnoses, msg):
  """Diagnoses the given disease by pattern matching.

  Can provide different diagnoses for different patterns.

  Args:
    short_name: Short name of the disease.
    long_name:  Long name of the disease.
    diagnoses:  A list of pairs (regex, pattern for formatting the diagnosis
                for matching regex).
    msg:        Compiler's error messages.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…