Skip to main content

Branch

Cursorless ID: branch

Spoken form​

Default: branch

Syntax​

  • branch - Branch of a control-flow construct, such as if, try, switch, or ternary.

Examples​

  • "take branch blue air" - Selects the branch containing the token containing letter a with a blue hat.

Visualization​

Branch: If​

An if branch
C​
C#​
Dart​
Go​
Java​
JavaScript​
Kotlin​
Lua​
PHP​
Python​
R​
Ruby​
Rust​
Scala​
SCSS​

Branch: If elif else​

An if-elif-else branch. The removal range for the if branch should include the trailing else keyword.
C​
C#​
Dart​
Go​
Java​
JavaScript​
Kotlin​
Lua​
PHP​
Python​
R​
Ruby​
Rust​
Scala​
SCSS​

Branch: If else​

An if-else branch
C​
C#​
Dart​
Go​
Java​
JavaScript​
Kotlin​
Lua​
PHP​
Python​
R​
Ruby​
Rust​
Scala​
SCSS​

Branch: Loop​

A for / while loop branch. For most languages this is not supported, but eg in Python you can have an else branch for a loop.
Python​

Branch: Switch case​

A case/default branch in a switch statement
C​
C#​
Dart​
Go​
Java​
JavaScript​
Kotlin​
PHP​
Python​
R​
Ruby​
Rust​
Scala​

Branch: Ternary​

A branch in a ternary expression
C​
C#​
Dart​
Java​
JavaScript​
Kotlin​
PHP​
Python​
Ruby​

Branch: Try​

A try/catch/finally branch
C++​
C#​
Dart​
Java​
JavaScript​
Kotlin​
PHP​
Python​
R​
Ruby​
Scala​

Branch: If (iteration)​

Iteration scope for if/elif/else branches: the if-else statement.
C​
C#​
Dart​
Go​
Java​
JavaScript​
Kotlin​
Lua​
PHP​
Python​
R​
Ruby​
Rust​
Scala​
SCSS​

Branch: Loop (iteration)​

Iteration scope for loop branches: the loop statement.
Python​

Branch: Switch case (iteration)​

Iteration scope for switch branches: the switch statement body.
C​
C#​
Dart​
Go​
Java​
JavaScript​
Kotlin​
PHP​
Python​
R​
Ruby​
Rust​
Scala​

Branch: Ternary (iteration)​

Iteration scope for ternary expression branches: the ternary expression.
C​
C#​
Dart​
Java​
JavaScript​
Kotlin​
PHP​
Python​
Ruby​

Branch: Try (iteration)​

Iteration scope for try/catch/finally branches: the try-catch statement.
C++​
C#​
Dart​
Java​
JavaScript​
Kotlin​
PHP​
Python​
R​
Ruby​
Scala​