SwitchCase AST Object
The SwitchCase
object matches a switch case in a switch statement
.
The astType
value for this node is switchcase
.
Code Pattern
This object catches switch case statements in most languages. For example, in JavaScript, it matches the following code:
case x:
// code block
break;
Attributes
condition
(typeAstElement
): instructions in the try blockcontent
(typeAstElement
): instructions in the finally block