Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1222)

Side by Side Diff: tools/lua/dumpops.lua

Issue 15737010: add dumpops.lua as a sample scraper that just dumps the arguments (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | tools/lua/scrape.lua » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
OLDNEW
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | tools/lua/scrape.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698