Skip to content

PartitionByVariable

cpgames edited this page Jul 14, 2022 · 1 revision

image

Partitions input Partition by all variable declarations and/or assignments.


Input Ports:

Start - execution entry.
Partition (type: Partition) - input partition.
DeclarationOrAssignmentFilter - filter by variable declaration or assignment.
VariableTypeFilter (type: regex string) - filter by variable type regex (only works with declarations). If left empty, all variable declarations/assignments will be returned.
VariableNameFilter (type: regex string) - filter by variable name regex. If left empty, all variable declarations/assignments will be returned.


Output Ports:

Done - execution exit.
Loop - executes for each variable declaration/assignment.
VariableBlock (type: Partition) - entire variable declaration/assignment block.
VariableScope (type: Partition) - variable scope (only if this is a declaration, otherwise null).
VariableModifier (type: Partition) - "static" or "const" (only if this is a declaration, otherwise null).
VariableReadonly (type: bool) - "static" or "const" (only if this is a declaration, otherwise false).
VariableType (type: Partition) - variable type (only if this is a declaration, otherwise null). Note: if variable is declared as var, VariableType will be 'var'.
VariableName (type: Partition) - variable name.
VariableValue (type: Partition) - assigned value (only if this is an assignment, otherwise null).
IsDeclaration (type: bool) - true if variable is declared in this VariableBlock.
IsAssignment (type: bool) - true if variable is assigned a value in this VariableBlock.


Example:

image

Clone this wiki locally