| Did you know ... | Search Documentation: |
| Example |
The following code searched for method references in the PCE documentation style.
find_method_ref(TextBuffer, Access, Method) :-
new(R, regex('(->|<-|<->)(\w+)')),
send(R, search, TextBuffer),
get(R, register_value,
1, TextBuffer, name, Arrow),
get(R, register_value,
2, TextBuffer, name, Method),
map_arrow(Arrow, Access).
map_arrow(->, send).
map_arrow(<-, get).
map_arrow(<->, both).