securesauce / precli

Precaution CLI - command line static application security testing tool
https://precli.readthedocs.io/
Other
13 stars 3 forks source link

Enhance the Node class with convenient functions #447

Closed ericwb closed 3 months ago

ericwb commented 3 months ago

This change adds the child_by_type() function to the tree-sitter Node class as a convenience function.

Note: this is only added to Python parser for now as other languages might support child_by_field_name(). tree-sitter-python apparently does not support child_by_field_name.