Function is_supported_extension

Source
pub fn is_supported_extension(extension: &str) -> bool
Expand description

Check if a file extension is supported by the parser

This function determines whether the tree parser library can handle files with the given extension by checking against the list of supported programming languages.

§Arguments

  • extension - The file extension to check (without the dot)

§Returns

true if the extension is supported, false otherwise.

§Examples

use tree_parser::is_supported_extension;
 
assert!(is_supported_extension("py"));
assert!(is_supported_extension("rs"));
assert!(is_supported_extension("js"));
assert!(!is_supported_extension("xyz"));