mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Another shot at getting the smoketest to run
This commit is contained in:
parent
dbf35b4176
commit
ffd7b55fef
3 changed files with 4 additions and 6 deletions
2
.github/workflows/prototyping.yml
vendored
2
.github/workflows/prototyping.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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) =
|
||||
|
|
Loading…
Add table
Reference in a new issue