Remove visualizeWithSelf

This commit is contained in:
JohnnyMorganz 2022-07-04 20:07:01 +01:00
parent ff329bcc48
commit 52bafd7eeb

View file

@ -205,20 +205,6 @@ struct Printer
}
}
void visualizeWithSelf(AstExpr& expr, bool self)
{
if (!self)
return visualize(expr);
AstExprIndexName* func = expr.as<AstExprIndexName>();
LUAU_ASSERT(func);
visualize(*func->expr);
writer.symbol(":");
advance(func->indexLocation.begin);
writer.identifier(func->index.value);
}
void visualizeTypePackAnnotation(const AstTypePack& annotation, bool forVarArg)
{
advance(annotation.location.begin);
@ -366,7 +352,7 @@ struct Printer
}
else if (const auto& a = expr.as<AstExprCall>())
{
visualizeWithSelf(*a->func, a->self);
visualize(*a->func);
writer.symbol("(");
bool first = true;