addQueryToTokenMap function

void addQueryToTokenMap(
  1. CompileTokenMap<List<CompileQuery>> map,
  2. CompileQuery query
)

Implementation

void addQueryToTokenMap(
  CompileTokenMap<List<CompileQuery>> map,
  CompileQuery query,
) {
  for (final selector in query.metadata.selectors!) {
    var entry = map.get(selector);
    if (entry == null) {
      entry = [];
      map.add(selector, entry);
    }
    entry.add(query);
  }
}