pfff is mainly an OCaml API to write static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.
What:
We currently fail to parse Scala programs which contain newlines before the guard of generator expressions.
Why:
This breaks some use cases. For instance, we cannot parse:
for {
x <- 3
if b
} yield 3
How:
I just added a thing which, irregardless of if there is a newline or space, checks beyond it to see if the next token is an if. If so, then it enters the guard loop.
Test plan:make test
Security
[x] Change has no security implications (otherwise, ping the security team)
Goes with #6033.
What: We currently fail to parse Scala programs which contain newlines before the guard of generator expressions.
Why: This breaks some use cases. For instance, we cannot parse:
How: I just added a thing which, irregardless of if there is a newline or space, checks beyond it to see if the next token is an
if
. If so, then it enters theguard
loop.Test plan:
make test
Security