semgrep / pfff

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.
https://semgrep.dev
Other
186 stars 29 forks source link

feat(js): opt chaining #561

Closed brandonspark closed 2 years ago

brandonspark commented 2 years ago

What:

Added support for parsing opt chaining in object accesses especially.

Why:

This will let us do matching where we differentiate the difference between x.y and x?.y.

How:

Added a Boolean signifying an optional chain to the JS AST.

Security

aryx commented 2 years ago

Can we merge this?

brandonspark commented 2 years ago

@aryx I posted in #team-pa-devs about this, I can't merge this for the same reason as Emma (merging is blocked).