static bool IsAttributeContext(AstNode node) { AstNode n = node; while (n is AstType) { n = n.Parent; } return n is Attribute; }