cinspector package¶
Subpackages¶
- cinspector.analysis package
- cinspector.nodes package
- Submodules
- cinspector.nodes.abstract_node module
- cinspector.nodes.basic_node module
AssignmentExpressionNode
BasicNode
BasicNode.internal_src
BasicNode.internal
BasicNode.internal_tree
BasicNode.node_type
BasicNode.ts_type
BasicNode.start_point
BasicNode.end_point
BasicNode.child_count
BasicNode.src
BasicNode.descendants()
BasicNode.print_tree()
BasicNode.child_by_field_name()
BasicNode.children
BasicNode.descendants()
BasicNode.descendants_by_type_name()
BasicNode.equal()
BasicNode.in_front()
BasicNode.internal_src
BasicNode.make_wrapper()
BasicNode.parent
BasicNode.print_tree()
BasicNode.tokenize()
BinaryExpressionNode
CallExpressionNode
CaseExpressionNode
CompoundStatementNode
ConditionalExpressionNode
DeclarationNode
DoStatementNode
EnumSpecifierNode
EnumeratorListNode
EnumeratorNode
ExpressionStatementNode
FieldDeclarationListNode
FieldDeclarationNode
FieldIdentifierNode
ForStatementNode
FunctionDeclaratorNode
FunctionDefinitionNode
IdentifierNode
IfStatementNode
InitDeclaratorNode
NumberLiteralNode
ParameterDeclarationNode
ParameterListNode
ParenthesizedExpressionNode
PreprocArgNode
PreprocDefNode
PreprocFunctionDefNode
ReturnStatementNode
StorageClassSpecifierNode
StructSpecifierNode
SubscriptExpressionNode
TypeIdentifierNode
TypeNode
TypeQualifierNode
UnaryExpressionNode
VariadicParameterNode
WhileStatementNode
- 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