requiresLocalProperties property
bool
get
requiresLocalProperties
Whether this query reads properties produced by a locals pass.
Implementation
bool get requiresLocalProperties {
_checkNotDisposed();
bool readsProperties(TreeSitterQueryPredicate predicate) =>
predicate.operator == TreeSitterQueryPredicateOperator.isProperty ||
predicate.operator == TreeSitterQueryPredicateOperator.isNotProperty;
return contextualCaptures.any(
(pattern) => pattern.predicates.any(readsProperties),
) ||
structuralPatterns.any(
(pattern) => pattern.predicates.any(
(predicate) => readsProperties(predicate.predicate),
),
);
}