Constructor
new ClangDocumentSplitter(root_directory_path, optionsopt)
constructor
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
root_directory_path |
string | root directory path | |
options |
ClangDocumentSplitterOptions |
<optional> |
split options |
- Source:
Methods
fix_loc(loc) → {Object}
Fix location
Parameters:
Name | Type | Description |
---|---|---|
loc |
Object | a clang location to fix |
- Source:
Returns:
the fixed location
- Type
- Object
fix_path(file_path) → {string}
Fix path
Parameters:
Name | Type | Description |
---|---|---|
file_path |
string | a file path to fix |
- Source:
Returns:
a fixed file path
- Type
- string
get_files(document, filesopt) → {Set.<string>}
Enumerate filenames in a clang document from both loc and expansionLoc nodes
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
document |
Object | a clang document | |
files |
Set.<string> |
<optional> |
previous set of filenames |
- Source:
Returns:
new set of filenames
- Type
- Set.<string>
log(msg)
Log a message
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | a message |
- Source:
scan(document, flag, passthrough) → {Object}
Scan (depth first search) all nodes in a clang document and fill-in this.documents and this.aggregate_documents_per_file
Parameters:
Name | Type | Description |
---|---|---|
document |
Object | a clang document/subdocument |
flag |
boolean | a flag to control scan mode (false=copy and fix, true=build a prefix of NamespaceDecl and LinkageSpecDecl) |
passthrough |
boolean | a flag |
- Source:
Returns:
sometimes a fixed clang document
- Type
- Object
split(document) → {Array.<Object>}
Split a clang document per filename
Parameters:
Name | Type | Description |
---|---|---|
document |
Object | a clang document |
- Source:
Returns:
some new documents (one per filename)
- Type
- Array.<Object>
warn(msg)
Log a warning message
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | a warning message |
- Source: