parameters: (expectation_string)
return_statement: return expectation
docstring: Extracts expectation definition from the trailing comment on the ifdef.
  
    See the comment on NCTEST_CONFIG_RE for examples of the format we are parsing.
  
    Args:
      expectation_string: A string like "// [r'some_regex']"
  
    Returns:
      A list of compiled regular expressions indicating all possible valid
      compiler outputs.  If the list is empty, all outputs are considered valid.
docstring_summary: Extracts expectation definition from the trailing comment on the ifdef.
docstring_tokens: Extracts expectation definition from the trailing comment on the ifdef .
function: def ParseExpectation(expectation_string):
    """Extracts expectation definition from the trailing comment on the ifdef.
  
    See the comment on NCTEST_CONFIG_RE for examples of the format we are parsing.
  
    Args:
      expectation_string: A string like "// [r'some_regex']"
  
    Returns:
      A list of compiled regular expressions indicating all possible valid
      compiler outputs.  If the list is empty, all outputs are considered valid.
    """
    assert expectation_string is not None
  
    match = EXTRACT_EXPECTATION_RE.match(expectation_string)
    assert match
  
    raw_expectation = ast.literal_eval(match.group(1))
    assert type(raw_expectation) is list
  
    expectation = []
    for regex_str in raw_expectation:
      assert type(regex_str) is str
      expectation.append(re.compile(regex_str))
    return expectation
function_tokens: def ParseExpectation ( expectation_string ) : assert expectation_string is not None match = EXTRACT_EXPECTATION_RE . match ( expectation_string ) assert match raw_expectation = ast . literal_eval ( match . group ( 1 ) ) assert type ( raw_expectation ) is list expectation = [ ] for regex_str in raw_expectation : assert type ( regex_str ) is str expectation . append ( re . compile ( regex_str ) ) return expectation