Migrate S1171 to AST