メインコンテンツ

polyspace.project.parseCode

(Python) Parse C/C++ source code added to project

Since R2025a

Description

codeInfo = polyspace.project.parseCode(proj, ForceReparse=reparseOrNot) parses the source code in the project proj and stores information about data types, functions, and global variables in the polyspace.project.CodeInfo object codeInfo.

If an error occurs during code parsing, the function throws an exception of type polyspace.ErrorWithLog. (since R2026a)

Input Arguments

expand all

Polyspace Platform project, specified as a polyspace.project.Project object.

Whether to perform full or incremental code analysis, specified as a bool value.

If you omit the ForceReparse argument or specify a value of False for this argument, the parseCode function only reanalyzes files that were modified since the previous code analysis (and uses previous code analysis information for unmodified files). If you want all files to be reanalyzed, set the ForceReparse argument to True.

Output Arguments

expand all

Source code information, returned as a polyspace.project.CodeInfo object. This object contains information about data types, functions, and global variables in your source code. You can author tests for your source code by For more information, see polyspace.project.CodeInfo.

Version History

Introduced in R2025a

expand all