nitc :: PrettyPrinterVisitor :: catch_up
current_token
and target
.
# Visit all tokens between `current_token` and `target`.
fun catch_up(target: nullable ANode) do
if target == null then return
if current_token == null then return
var token: Token
if target isa Token then
token = target
else if target isa Prod then
token = target.first_token.as(not null)
else
abort
end
if current_token.location > token.location then return
while current_token != token do visit current_token
end
src/pretty.nit:187,2--201,4