Another shot at getting the smoketest to run

This commit is contained in:
ajeffrey@roblox.com 2022-02-08 10:41:52 -06:00
parent dbf35b4176
commit ffd7b55fef
3 changed files with 4 additions and 6 deletions

View file

@ -42,7 +42,7 @@ jobs:
run: cmake --build . --target Luau.Ast.CLI run: cmake --build . --target Luau.Ast.CLI
- name: run smoketest - name: run smoketest
working-directory: prototyping 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 - name: diff smoketest
working-directory: prototyping working-directory: prototyping
run: diff Examples/SmokeTest.lua SmokeTestOutput.lua run: diff Examples/SmokeTest.lua SmokeTestOutput.lua

View file

@ -10,5 +10,3 @@ local function comp(f)
end end
local id2 = id(id) local id2 = id(id)
local nil2 = id2(nil) local nil2 = id2(nil)

View file

@ -20,7 +20,7 @@ exprToString lb (function⟨ x ⟩ B end) =
"end" "end"
statToString lb (function f x B end) = statToString lb (function f x B end) =
"function " ++ f ++ "(" ++ x ++ ")" ++ lb ++ "local function " ++ f ++ "(" ++ x ++ ")" ++ lb ++
" " ++ (blockToString (lb ++ " ") B) ++ lb ++ " " ++ (blockToString (lb ++ " ") B) ++ lb ++
"end" "end"
statToString lb (local x M) = statToString lb (local x M) =