mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix op used when stringifying AstExprIndexName
This commit is contained in:
parent
6467c855e8
commit
ff329bcc48
2 changed files with 3 additions and 3 deletions
|
@ -385,7 +385,7 @@ struct Printer
|
|||
else if (const auto& a = expr.as<AstExprIndexName>())
|
||||
{
|
||||
visualize(*a->expr);
|
||||
writer.symbol(".");
|
||||
writer.symbol(std::string(1, a->op));
|
||||
writer.write(a->index.value);
|
||||
}
|
||||
else if (const auto& a = expr.as<AstExprIndexExpr>())
|
||||
|
@ -766,7 +766,7 @@ struct Printer
|
|||
else if (const auto& a = program.as<AstStatFunction>())
|
||||
{
|
||||
writer.keyword("function");
|
||||
visualizeWithSelf(*a->name, a->func->self != nullptr);
|
||||
visualize(*a->name);
|
||||
visualizeFunctionBody(*a->func);
|
||||
}
|
||||
else if (const auto& a = program.as<AstStatLocalFunction>())
|
||||
|
|
|
@ -583,7 +583,7 @@ TEST_CASE_FIXTURE(Fixture, "transpile_error_expr")
|
|||
auto names = AstNameTable{allocator};
|
||||
ParseResult parseResult = Parser::parse(code.data(), code.size(), names, allocator, {});
|
||||
|
||||
CHECK_EQ("local a = (error-expr: f.%error-id%)-(error-expr)", transpileWithTypes(*parseResult.root));
|
||||
CHECK_EQ("local a = (error-expr: f:%error-id%)-(error-expr)", transpileWithTypes(*parseResult.root));
|
||||
}
|
||||
|
||||
TEST_CASE_FIXTURE(Fixture, "transpile_error_stat")
|
||||
|
|
Loading…
Add table
Reference in a new issue