title: Match root element of partial AST
body: <p>I want to refactor some C code using Clair and Rascal.
  I search for a function with a certain name. If I find such a function, I want to replace it with another function. I need to choose between four functions. The function to choose depends on the argument of the function found. I need to match the root element of an expression. </p>
  
  <p>I can match using the visit pattern. I tried</p>
  
  <pre><code>visit(body) {
    case \functionCall(func, args): {
      if ("myName" == func.name.\value) {
        visit(args[0]) {
          case \equals(_, _): println("Equals");
          case \notEquals(_, _): println("Not equals");
        }             
      }
    }
  }
  </code></pre>
  
  <p>This does not guarantee I match the root element. 
  In (A != B) == C I only want to match the ==</p>
  
  <p>How can I match only the root element?</p>