[pname dispatcher] more permissive templated function match

Summary: This allows to match `foo<int_&>` and many other horrible names.

Reviewed By: mbouaziz

Differential Revision: D15825403

fbshipit-source-id: c892033aa
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent 472f155a7a
commit 696731523d

@ -140,9 +140,7 @@ let name_cons :
fun m name ->
let {on_templated_name; get_markers} = m in
let match_fuzzy_name =
let fuzzy_name_regexp =
name |> Str.quote |> Printf.sprintf "^%s\\(<[a-z0-9_:<>]+>\\)?$" |> Str.regexp
in
let fuzzy_name_regexp = name |> Str.quote |> Printf.sprintf "^%s\\(<.+>\\)?$" |> Str.regexp in
fun s -> Str.string_match fuzzy_name_regexp s 0
in
let on_qual_name context f qual_name =

Loading…
Cancel
Save