Skip to main content

Module replacing

Module replacing 

Source
Expand description

Code for applying replacement templates for matches that have previously been found.

StructsΒ§

ReplacementRenderer πŸ”’

FunctionsΒ§

matches_to_edit πŸ”’
Returns a text edit that will replace each match in matches with its corresponding replacement template. Placeholders in the template will have been substituted with whatever they matched to in the original code.
matches_to_edit_at_offset πŸ”’
parse_as_kind πŸ”’
render_replace πŸ”’
token_is_method_call_receiver πŸ”’
Returns whether token is the receiver of a method call. Note, being within the receiver of a method call doesn’t count. e.g. if the token is $a, then $a.foo() will return true, while ($a + $b).foo() or x.foo($a) will return false.