code: func parseOrPanic(simplify bool, pattern string) *syntax.Regexp {
  	regexp, err := syntax.Parse(pattern, 0)
  	if err != nil {
  		panic(err)
  	}
  	if simplify {
  		regexp = regexp.Simplify()
  	}
  	return regexp
  }
docs: // ParseOrPanic parses a regular expression into an AST.
  // Panics on error.