This is a bit of an extension to a problem I posted here Pattern matching AST nodes in Rascal
I've made a bit of a modification to how the switch statement looks for patterns but it appears that none of the patterns are matching and the default pattern isn't executing!
Code:
private str synthesise_f(Core::AST::Exp exp) {
println("START");
switch (exp) {
case Exp e: str t(&T t0, &T t1) {
println("IN CASE");
}
default: println("!DEFAULT!");
}
println("END");
return ret;
}
With the output being:
START
END
Any ideas what might be happening here? Am I doing something wrong?
Thanks!