Matches only explicit C-style casts.
This pattern is equivalent to using the castOperator pattern
with the .kind property set to `explicit`.
This pattern only matches nodes of type expression.
Properties
castOperatorExplicit produces a record that contains the following properties:
| Name | Type | Description |
|---|---|---|
operandExpression |
expression |
The expression being cast |
kind |
enum castKind |
`explicit`;
see castKind
|
The .type property, common to all expression nodes,
indicates the type the operand is being cast to.
The type of the expression being cast is determined by
.operandExpression.type.
In other words, this pattern represents a cast from .operandExpression.type
to .type.
Inherits properties from:
Example
To match an explicit cast from the int type, you could use the following CodeXM pattern:
pattern explicitCastFromInt {
castOperatorExplicit {
.operandExpression.type == intType;
}
};