Noir::CallFold
Folds a call or subscript left open at a line end onto the line that
opens it, so a per-line accessor regex also sees a wrapped read
(params.fetch( / :q / )) as params.fetch(:q).
For the #-comment, "/'-string languages (Ruby, Crystal, Elixir).
Python has its own triple-quote-aware fold in PythonEngine.
Constants
A wrapped accessor read spans a handful of lines. A ( still open
after this many is a long call (or a mis-scan, like a ( in a regex
literal) and is left unfolded rather than glued onto far-away code.
Instance methods
x["q",] → x["q"]: formatters (crystal tool format, black,
prettier) add a trailing comma to a wrapped argument list, which the
accessor regexes would read as part of the name.
lines, same size, each cut by the block (the language's comment
stripper) and rstripped. A line that leaves a ( or [ open is
followed by its (stripped) continuation lines, which also come back
as themselves, so a per-line scan over the result finds everything it
found on the comment-cut lines plus the wrapped reads.