cinspector package¶
Subpackages¶
- cinspector.analysis package
- cinspector.nodes package
- Submodules
- cinspector.nodes.abstract_node module
- cinspector.nodes.basic_node module
AssignmentExpressionNodeBasicNodeBasicNode.internal_srcBasicNode.internalBasicNode.internal_treeBasicNode.node_typeBasicNode.ts_typeBasicNode.start_pointBasicNode.end_pointBasicNode.child_countBasicNode.srcBasicNode.descendants()BasicNode.print_tree()BasicNode.child_by_field_name()BasicNode.childrenBasicNode.descendants()BasicNode.descendants_by_type_name()BasicNode.equal()BasicNode.in_front()BasicNode.internal_srcBasicNode.make_wrapper()BasicNode.parentBasicNode.print_tree()BasicNode.tokenize()
BinaryExpressionNodeCallExpressionNodeCaseExpressionNodeCompoundStatementNodeConditionalExpressionNodeDeclarationNodeDoStatementNodeEnumSpecifierNodeEnumeratorListNodeEnumeratorNodeExpressionStatementNodeFieldDeclarationListNodeFieldDeclarationNodeFieldIdentifierNodeForStatementNodeFunctionDeclaratorNodeFunctionDefinitionNodeIdentifierNodeIfStatementNodeInitDeclaratorNodeNumberLiteralNodeParameterDeclarationNodeParameterListNodeParenthesizedExpressionNodePreprocArgNodePreprocDefNodePreprocFunctionDefNodeReturnStatementNodeStorageClassSpecifierNodeStructSpecifierNodeSubscriptExpressionNodeTypeIdentifierNodeTypeNodeTypeQualifierNodeUnaryExpressionNodeVariadicParameterNodeWhileStatementNode
- cinspector.nodes.edit module
- cinspector.nodes.node module
- Module contents
Submodules¶
cinspector.interfaces module¶
Interfaces for users
This file defines several interfaces to ease the use of cinspector.
In particular, CProj is the interface for the whole C-based project, which usually contains some directories including header and source files.
CCode is the base interface for any interfaces that represent source code, such as CFile.
- class cinspector.interfaces.CCode(src)[source]¶
Bases:
object- get_by_condition(condition: Callable[[Node], bool]) list[source]¶
Access the nodes that satisfy the condition
- get_by_type_name_and_field(type_name: str, field: Dict[str, str]) list[source]¶
Access the nodes by assigning node_type and fields. Note that the nodes that don’t statisfy the type requirements, don’t own the assigned FIELDS, and don’t own the assigned FIELD VALUES will be filter out.
- Returns:
list containing the nodes that satisfy the type and field requirements