Skip to main content

Module convert_bool_to_enum

Module convert_bool_to_enum 

Source

Structsยง

BoolNodeData ๐Ÿ”’
FileReferenceWithImport ๐Ÿ”’

Functionsยง

add_enum_def ๐Ÿ”’
Adds the definition of the new enum before the target node.
augment_references_with_imports ๐Ÿ”’
bool_expr_to_enum_expr ๐Ÿ”’
Converts an expression of type bool to one of the new enum type.
convert_bool_to_enum ๐Ÿ”’
find_assignment_usage ๐Ÿ”’
find_assoc_const_usage ๐Ÿ”’
find_bool_node ๐Ÿ”’
Attempts to find an appropriate node to apply the action to.
find_method_call_expr_usage ๐Ÿ”’
find_negated_usage ๐Ÿ”’
find_record_expr_usage ๐Ÿ”’
find_record_pat_field_usage ๐Ÿ”’
make_bool_enum ๐Ÿ”’
node_to_insert_before ๐Ÿ”’
Finds where to put the new enum definition. Tries to find the ast node at the nearest module or at top-level, otherwise just returns the input node.
replace_bool_expr ๐Ÿ”’
replace_usages ๐Ÿ”’
Replaces all usages of the target identifier, both when read and written to.