Skip to main content

Crate fragmentize

Crate fragmentize 

Source

Enums§

OwnedToken
Token

Functions§

filter_out_includes
Filters out #include "XXX.h" where file_name is "XXX"
get_define_name
Gets the name of the define statement Ex) for #define FOO 42, this would return “FOO”
get_defines
get_fn_def
get_fn_name
Gets the name of a function
get_include_name
get_includes
get_udt_name
Gets the name of the struct Ex) for struct Point {...}, this would return “Point”
get_udts
Extracts the user defined types (UDTs)
insert_self_include
Expects raw source code and an include path (in the form "../include/filename.h") This will do nothing and return code if the include statement already exists, otherwise it will insert it at the end of all the include statements
is_likely_function
merge_defines
Returns an error if there are any duplicate definitions Otherwise, adds all definitions in src to dst
merge_includes
Returns an error if there are any duplicate definitions Otherwise, adds all definitions in src to dst
merge_udts
Returns an error if there are any duplicate definitions Otherwise, adds all definitions in src to dst
next_non_whitespace_token
Passing the below list to this function would return 3 (gets the next token, not the current token) [object-token-curr, whitespace, whitespace, object-token-next]
reconstruct_source
Reconstructs the soruce code excluding the ranges specified
tokenize