anchor.diff:      }
       return selectorMatcher;
     }
  -
  -  List<ng.DirectiveAst> _toAst(
  -          Iterable<CompileDirectiveMetadata> directiveMetas,
  -          SourceSpan sourceSpan) =>
  -      directiveMetas
  -          .map((directive) => new ng.DirectiveAst(directive, [] /* inputs */,
  -              [] /* hostProperties */, [] /* hostEvents */, sourceSpan))
  -          .toList();
  -
  -  static String _location(ast.TemplateAst astNode) =>
  -      astNode.isSynthetic ? '' : astNode.sourceSpan.start.toString();
  -}
  -
  -class ParseContext {
  -  final List<CompileDirectiveMetadata> directives;
  -  final String elementName;
  -
  -  ParseContext({this.directives, this.elementName});
  -
  -  ParseContext withElementName(String name) =>
  -      new ParseContext(elementName: name, directives: directives);
  +}
  +
  +CssSelector _elementSelector(ast.ElementAst astNode) => _selector(
  +    astNode.name, astNode.attributes, astNode.properties, astNode.events);
  +
  +CssSelector _templateSelector(ast.EmbeddedTemplateAst astNode) => _selector(
  +    TEMPLATE_ELEMENT, astNode.attributes, astNode.properties, astNode.events);
  +
  +CssSelector _selector(String elementName, List<ast.AttributeAst> attributes,
  +    List<ast.PropertyAst> properties, List<ast.EventAst> events) {
  +  final matchableAttributes = [];
  +  for (var attr in attributes) {
  +    matchableAttributes.add([attr.name, attr.value]);
  +  }
  +  for (var property in properties) {
  +    matchableAttributes.add([property.name, property.value]);
  +  }
  +  for (var event in events) {
  +    matchableAttributes.add([event.name, event.value]);
  +  }
  +  return createElementCssSelector(elementName, matchableAttributes);
   }
   
   /// Visitor which filters elements that are not supported in angular templates.
  
positive.code:     return results;
    }
  
    List<CompileDirectiveMetadata> _matchElementDirectives(
            ParseContext context, ast.ElementAst astNode) =>
        _parseDirectives(context.directives, _elementSelector(astNode));
  
    List<CompileDirectiveMetadata> _matchTemplateDirectives(
            ParseContext context, ast.EmbeddedTemplateAst astNode) =>
        _parseDirectives(context.directives, _templateSelector(astNode));
  
    CssSelector _elementSelector(ast.ElementAst astNode) => _selector(
        astNode.name, astNode.attributes, astNode.properties, astNode.events);
  
    CssSelector _templateSelector(ast.EmbeddedTemplateAst astNode) => _selector(
        TEMPLATE_ELEMENT, astNode.attributes, astNode.properties, astNode.events);
  
    CssSelector _selector(String elementName, List<ast.AttributeAst> attributes,
        List<ast.PropertyAst> properties, List<ast.EventAst> events) {
      final matchableAttributes = [];
      for (var attr in attributes) {
        matchableAttributes.add([attr.name, attr.value]);
      }
      for (var property in properties) {
        matchableAttributes.add([property.name, property.value]);
      }
      for (var event in events) {
        matchableAttributes.add([event.name, event.value]);
      }
      return createElementCssSelector(elementName, matchableAttributes);
    }
  
    List<CompileDirectiveMetadata> _parseDirectives(
        List<CompileDirectiveMetadata> directives,
        CssSelector elementCssSelector) {
      var matchedDirectives = new Set();
  
negative.code:     return directives.where(matchedDirectives.contains).toList();
    }
  
    static SelectorMatcher _selectorMatcher(
        List<CompileDirectiveMetadata> directives) {
      final SelectorMatcher selectorMatcher = new SelectorMatcher();
      for (var directive in directives) {
        var selector = CssSelector.parse(directive.selector);
  