Namespace: FlowControl

FlowControl

Flow Control operations.

Author:
  • <p>n1474335 [n1474335@gmail.com]</p>
License:
  • Apache-2.0
Source:

Members


<static, constant> FORK_DELIM

Default Value:
  • \n
Source:

<static, constant> MERGE_DELIM

Default Value:
  • \n
Source:

<static, constant> JUMP_NUM

Source:

<static, constant> MAX_JUMPS

Default Value:
  • 10
Source:

Methods


<static> run_fork(state)

Fork operation.

Parameters:
Name Type Description
state Object

The current state of the recipe.

Properties
Name Type Description
progress number

The current position in the recipe.

dish Dish

The Dish being operated on.

op_list Array.<Operation>

The list of operations in the recipe.

Source:
Returns:

The updated state of the recipe.

Type
Object

<static> run_merge(state)

Merge operation.

Parameters:
Name Type Description
state Object

The current state of the recipe.

Properties
Name Type Description
progress number

The current position in the recipe.

dish Dish

The Dish being operated on.

op_list Array.<Operation>

The list of operations in the recipe.

Source:
Returns:

The updated state of the recipe.

Type
Object

<static> run_jump(state)

Jump operation.

Parameters:
Name Type Description
state Object

The current state of the recipe.

Properties
Name Type Description
progress number

The current position in the recipe.

dish Dish

The Dish being operated on.

op_list Array.<Operation>

The list of operations in the recipe.

num_jumps number

The number of jumps taken so far.

Source:
Returns:

The updated state of the recipe.

Type
Object

<static> run_cond_jump(state)

Conditional Jump operation.

Parameters:
Name Type Description
state Object

The current state of the recipe.

Properties
Name Type Description
progress number

The current position in the recipe.

dish Dish

The Dish being operated on.

op_list Array.<Operation>

The list of operations in the recipe.

num_jumps number

The number of jumps taken so far.

Source:
Returns:

The updated state of the recipe.

Type
Object

<static> run_return(state)

Return operation.

Parameters:
Name Type Description
state Object

The current state of the recipe.

Properties
Name Type Description
progress number

The current position in the recipe.

dish Dish

The Dish being operated on.

op_list Array.<Operation>

The list of operations in the recipe.

Source:
Returns:

The updated state of the recipe.

Type
Object