AttributePattern returns an AttributePattern that matches a top-level variable. The pattern is mutable, and its methods support the specification of one or more qualifier patterns. For example, the AttributePattern(`a`).QualString(`b`) represents a variable access `a` with a string field or index q
(varName string)
| 110 | // rules. Pick the fully qualified variable name that makes sense within the container as the |
| 111 | // AttributePattern `varName` argument. |
| 112 | func AttributePattern(varName string) *AttributePatternType { |
| 113 | return interpreter.NewAttributePattern(varName) |
| 114 | } |
| 115 | |
| 116 | // AttributePatternType represents a top-level variable with an optional set of qualifier patterns. |
| 117 | // |