cinspector package

Subpackages

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(type_name: str) list[source]
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

get_by_type_name_and_query(type_name: str, query: Dict[str, str]) list[source]
class cinspector.interfaces.CFile(file_path)[source]

Bases: CCode

TODO

class cinspector.interfaces.CProj(proj_path: str)[source]

Bases: object

TODO

cinspector.parser module

cinspector.parser.main()[source]

Module contents