isProperty property

bool get isProperty

True if this refers to a property name.

Implementation

bool get isProperty =>
    (parent is MemberExpression &&
        (parent as MemberExpression).property == this) ||
    (parent is Property && (parent as Property).key == this);