diff --git a/.github/workflows/prototyping.yml b/.github/workflows/prototyping.yml index 9a1b4f7f..bbca2b52 100644 --- a/.github/workflows/prototyping.yml +++ b/.github/workflows/prototyping.yml @@ -42,7 +42,7 @@ jobs: run: cmake --build . --target Luau.Ast.CLI - name: run smoketest working-directory: prototyping - run: ./lua-ast Examples/SmokeTest.lua | ./PrettyPrinter > Examples/SmokeTestOutput.lua + run: ../luau-ast Examples/SmokeTest.lua | ./PrettyPrinter > Examples/SmokeTestOutput.lua - name: diff smoketest working-directory: prototyping run: diff Examples/SmokeTest.lua SmokeTestOutput.lua diff --git a/prototyping/Examples/SmokeTest.lua b/prototyping/Examples/SmokeTest.lua index 931b4f4e..b1b91e19 100644 --- a/prototyping/Examples/SmokeTest.lua +++ b/prototyping/Examples/SmokeTest.lua @@ -3,12 +3,10 @@ local function id(x) end local function comp(f) return function(g) - return function (x) + return function(x) return f(g(x)) end end end local id2 = id(id) local nil2 = id2(nil) - - diff --git a/prototyping/Luau/Syntax/ToString.agda b/prototyping/Luau/Syntax/ToString.agda index 1256a7ac..87876565 100644 --- a/prototyping/Luau/Syntax/ToString.agda +++ b/prototyping/Luau/Syntax/ToString.agda @@ -15,12 +15,12 @@ exprToString′ lb (var x) = exprToString′ lb (M $ N) = (exprToString′ lb M) ++ "(" ++ (exprToString′ lb N) ++ ")" exprToString′ lb (function⟨ x ⟩ B end) = - "function (" ++ x ++ ")" ++ lb ++ + "function(" ++ x ++ ")" ++ lb ++ " " ++ (blockToString′ (lb ++ " ") B) ++ lb ++ "end" statToString′ lb (function f ⟨ x ⟩ B end) = - "function " ++ f ++ "(" ++ x ++ ")" ++ lb ++ + "local function " ++ f ++ "(" ++ x ++ ")" ++ lb ++ " " ++ (blockToString′ (lb ++ " ") B) ++ lb ++ "end" statToString′ lb (local x ← M) =