File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,21 @@ let generateLua (x: Dom) : string =
3434 .Append( luaCall <| " api." + c.Callee)
3535 .Append( " (" ) |> ignore
3636
37- c.UnnamedArgs
38- |> List.map ( function
39- | Symbol " true" -> " true"
40- | Symbol " false" -> " false"
41- | Symbol " null" | Symbol " nil" -> " nil"
42- | Symbol x -> luaCall <| " api." + x
43- | Integer x -> string x
44- | Number x -> string x
45- | String x -> " \" " + Constants.string2literal x + " \" " )
46- |> List.reduce ( fun a b -> a + " , " + b)
47- |> sb.Append
48- |> ignore
37+ let args =
38+ c.UnnamedArgs
39+ |> List.map ( function
40+ | Symbol " true" -> " true"
41+ | Symbol " false" -> " false"
42+ | Symbol " null" | Symbol " nil" -> " nil"
43+ | Symbol x -> luaCall <| " api." + x
44+ | Integer x -> string x
45+ | Number x -> string x
46+ | String x -> " \" " + Constants.string2literal x + " \" " )
47+
48+ if not <| List.isEmpty args then
49+ |> List.reduce ( fun a b -> a + " , " + b)
50+ |> sb.Append
51+ |> ignore
4952
5053 sb.Append( " ) end," ) |> ignore
5154
You can’t perform that action at this time.
0 commit comments