(Not perfect, but at least correct, and usually enough for a temporary logging call)
enhancement I usually need to include logging statement before the expression, since these are often expect calls. I added an option js2r-always-log-before to use the same placement as return logging calls. It defaults to nil for backward compatibility
Apologies that this PR contains two separate changes. They're split into one commit each:
js2r-log-this
and similar in a single-line function on a return statement inserts the logging call in the wrong location:With this change, it becomes:
(Not perfect, but at least correct, and usually enough for a temporary logging call)
expect
calls. I added an optionjs2r-always-log-before
to use the same placement asreturn
logging calls. It defaults tonil
for backward compatibility