reed@google.com | 74ce6f0 | 2013-05-22 15:13:18 +0000 | [diff] [blame] | 1 | function tostr(t) |
| 2 | local str = "" |
| 3 | for k, v in next, t do |
| 4 | if #str > 0 then |
| 5 | str = str .. ", " |
| 6 | end |
| 7 | if type(k) == "number" then |
| 8 | str = str .. "[" .. k .. "] = " |
| 9 | else |
| 10 | str = str .. tostring(k) .. " = " |
| 11 | end |
| 12 | if type(v) == "table" then |
| 13 | str = str .. "{ " .. tostr(v) .. " }" |
| 14 | else |
| 15 | str = str .. tostring(v) |
| 16 | end |
| 17 | end |
| 18 | return str |
| 19 | end |
| 20 | |
| 21 | function sk_scrape_startcanvas(c, fileName) end |
| 22 | |
| 23 | function sk_scrape_endcanvas(c, fileName) end |
| 24 | |
| 25 | function sk_scrape_accumulate(t) |
| 26 | -- dump the params in t, specifically showing the verb first, which we |
| 27 | -- then nil out so it doesn't appear in tostr() |
| 28 | io.write(t.verb, " ") |
| 29 | t.verb = nil |
| 30 | io.write(tostr(t), "\n") |
| 31 | end |
| 32 | |
| 33 | function sk_scrape_summarize() end |
| 34 | |