google-research / python-graphs

A static analysis library for computing graph representations of Python programs suitable for use with graph neural networks.
Apache License 2.0
325 stars 39 forks source link

Separate branch kinds #3

Closed dbieber closed 2 years ago

dbieber commented 2 years ago

Splits "branches" into branches, except_branches, and reraise_branches.

branches are you're usual branch decisions: ifs, fors, and whiles. except_branches are at "except E:" statements, with True indicating the exception matches and False indicating it does not reraise_branches are at the end of "finally:" blocks, with True indicating the path taken after finally if an error has been raised previously, and False indicating the path taken if there's nothing to reraise at the end of the finally.