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. 

I can match using the visit pattern. I tried

```
visit(body) {
  case \functionCall(func, args): {
    if ("myName" == func.name.\value) {
      visit(args[0]) {
        case \equals(_, _): println("Equals");
        case \notEquals(_, _): println("Not equals");
      }             
    }
  }
}

```

This does not guarantee I match the root element. 
In (A != B) == C I only want to match the ==

How can I match only the root element?