pygccxml.declarations.call_invocation module

Free function invocation parser

The parser is able to extract function name and list of arguments from a function invocation statement. For example, for the following code

do_something( x1, x2, x3 )

the parser will extract - function name - do_something - argument names - [ x1, x2, x3 ]

args(declaration_string)

Returns list of function arguments

Return type

[str]

find_args(text, start=None)

Finds arguments within function invocation.

Return type

[ arguments ] or :data:NOT_FOUND if arguments could not be found.

is_call_invocation(declaration_string)

Returns True if declaration_string is a function invocation.

Parameters

declaration_string (str) – string that should be checked for pattern.

Return type

bool

join(name_, args_, arg_separator=None)

Returns name( argument_1, argument_2, …, argument_n ).

name(declaration_string)

Returns the name of a function.

Return type

str

split(declaration_string)

Returns (name, [arguments] )

split_recursive(declaration_string)

Returns [(name, [arguments])].