Matches simple expression initializers used to initialize scalar objects.
This pattern only matches nodes of type initializer.
Properties
expressionInitializer produces a record that contains the following property:
| Name | Type | Description |
|---|---|---|
expression |
expression |
The expression that evaluates to the value that is used to initialize the scalar object |
Inherits properties from:
Example
This pattern would match the following Go initialization:
var a = x + y
The following CodeXM pattern matches all initializations done using binary operations:
pattern binaryOperationInitializer {
expressionInitializer {
.expression == binaryOperator;
}
};