Update AST with new pattern matching methods