analyse_identifiers function

(Shortest import: from brian2.codegen.translation import analyse_identifiers)

brian2.codegen.translation.analyse_identifiers(code, variables, recursive=False)[source]

Analyses a code string (sequence of statements) to find all identifiers by type.

In a given code block, some variable names (identifiers) must be given as inputs to the code block, and some are created by the code block. For example, the line:

a = b+c

This could mean to create a new variable a from b and c, or it could mean modify the existing value of a from b or c, depending on whether a was previously known.