Skip to content

CST: Sync to Luau 0.675; Handle chained function types #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extern/luau.tune
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[dependency]
name = "luau"
remote = "https://github.com/luau-lang/luau.git"
branch = "0.673"
revision = "3eb0c1367889e37fb0b3f0ab6d21b6a8cce10eae"
branch = "0.675"
revision = "59658182835dc39f598a4fc16ba0b177b8e6f55b"
6 changes: 3 additions & 3 deletions luau/src/luau.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
const char* COMPILE_RESULT_TYPE = "CompileResult";

LUAU_FASTFLAG(LuauStoreCSTData2)
LUAU_FASTFLAG(LuauFixFunctionWithAttributesStartLocation)
LUAU_FASTFLAG(LuauStoreReturnTypesAsPackOnAst)
LUAU_FASTFLAG(LuauStoreLocalAnnotationColonPositions)
LUAU_FASTFLAG(LuauCSTForReturnTypeFunctionTail)

namespace luau
{
Expand All @@ -40,9 +40,9 @@ static StatResult parse(std::string& source)
{
// TODO: this is very bad, fix it!
FFlag::LuauStoreCSTData2.value = true;
FFlag::LuauFixFunctionWithAttributesStartLocation.value = true;
FFlag::LuauStoreReturnTypesAsPackOnAst.value = true;
FFlag::LuauStoreLocalAnnotationColonPositions.value = true;
FFlag::LuauCSTForReturnTypeFunctionTail.value = true;

auto allocator = std::make_shared<Luau::Allocator>();
auto names = std::make_shared<Luau::AstNameTable>(*allocator);
Expand All @@ -69,9 +69,9 @@ static ExprResult parseExpr(std::string& source)
{
// TODO: this is very bad, fix it!
FFlag::LuauStoreCSTData2.value = true;
FFlag::LuauFixFunctionWithAttributesStartLocation.value = true;
FFlag::LuauStoreReturnTypesAsPackOnAst.value = true;
FFlag::LuauStoreLocalAnnotationColonPositions.value = true;
FFlag::LuauCSTForReturnTypeFunctionTail.value = true;

auto allocator = std::make_shared<Luau::Allocator>();
auto names = std::make_shared<Luau::AstNameTable>(*allocator);
Expand Down
1 change: 1 addition & 0 deletions tests/astSerializerTests/function-type-3.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type Foo = () -> () -> ()