Matches references to attributes; that is, expressions with dot notation such as test.type.
This pattern only matches nodes of type expression.
Properties
attributeReference produces a record that contains the following properties:
| Name | Type | Description |
|---|---|---|
primaryExpression |
expression |
The base (the left-hand side) of the attribute reference expression |
propertyExpression |
expression |
The accessed property (the right-hand side) of the attribute reference expression |
Inherits properties from:
Example
The following CodeXM pattern matches an attribute expression that accesses a property named foo:
pattern fooAttribute {
attributeReference {
.primaryExpression == stringLiteral {
.valueString == "foo"
}
}
};