Skip to main content

Module utils

Module utils 

Source

Functionsยง

count_non_comment_matches
Count non-comment occurrences of a pattern in source content
count_non_import_matches
Count non-comment, non-import occurrences of a pattern in source content
find_line_of_str
Find the line number of a string literal in source content (skipping comments)
find_line_of_str_non_import
Find the line number of a string literal, skipping comments and import statements
get_column_number
Get column number from syn AST node using proc_macro2 span-locations
get_line_number
Get line number from syn AST node using proc_macro2 span-locations
get_position
Get position info (line, column) from syn AST node