ID is an implementation of the Attribute interface method.
()
| 529 | |
| 530 | // ID is an implementation of the Attribute interface method. |
| 531 | func (a *conditionalAttribute) ID() int64 { |
| 532 | // There's a field access after the conditional. |
| 533 | if a.truthy.ID() == a.falsy.ID() { |
| 534 | return a.truthy.ID() |
| 535 | } |
| 536 | // Otherwise return the conditional id as the consistent id being tracked. |
| 537 | return a.id |
| 538 | } |
| 539 | |
| 540 | // IsOptional returns trivially false for an attribute as the attribute represents a fully |
| 541 | // qualified variable name. If the attribute is used in an optional manner, then an attrQualifier |