functiongetProbeTree

Information

Returns the probe tree of a file as JSON, for property probing tools like CodeProber: the nodes of the file with their source spans and the names of the properties that evaluateProbe can evaluate on them.

The tree is built from the file as it's parsed: the file (StoredDefinition), its classes (ClassDefinition), their elements (ComponentDeclaration, ComponentClause for several components declared together, ExtendsClause, ImportClause), equations (Equation) and statements (Statement), nested like in the source, and the names in them (Ident), declared or used, found like in getDefUseChains. A node has an id, the indices of the children from the root, e.g. 0.1.3, which stays the same as long as the file doesn't change, its kind, a label, its span, its properties and its children. If the file can't be parsed, root is null and errors has the syntax errors.

Inputs

TypeNameDefaultDescription
StringfileNameA file whose classes are loaded.
BooleanprettyPrintfalse

Outputs

TypeNameDefaultDescription
Stringtree