UnwrapBlock(IStatement)
Extracts an IStatementList from a block statement, or creates a singleton list if the statement is not a block.
Declaration
public static IStatementList UnwrapBlock(IStatement statement)Parameters
| Type | Name | Description |
|---|---|---|
| IStatement | statement | The statement to unwrap. |
Returns
| Type | Description |
|---|---|
| IStatementList | An IStatementList containing the statements from the block if |
Remarks
This method is useful when you need to work with the individual statements inside a block, or when you want to treat any statement uniformly as a list of statements.