Closed
Bug 496024
Opened 16 years ago
Closed 15 years ago
Make use of iterators for dehydra's process callback
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: taras.mozilla, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
We've long had a top-secret process() callback(it never got documented) and convenience function called iter(). Unfortunately iter is written in a functional style and some have complained about it not using generators instead. So I took this one step futher and made it so process() is passed a generator to variables in the current statement, this makes "grepping" a whole lot more convenient. Compare the example at http://www.kdedevelopers.org/node/3970 With: function process(statement_items) { for each (var v in statement_items) { if (v.shortName == "strcpy") error("Evil") } } Would be nice if some JS expert confirmed that this is the right way(tm).
Reporter | ||
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
(In reply to comment #1) > Created an attachment (id=381164) [details] > patch to dehydra.js Cc'ing better Pythonistas than a poser like me. I like it -- "flat is better than nested" -- but that does not apply to the indentation :-P. Indent the inner for loops and their bodies appropriately. Also, let goes with yield like a fish with a fighter-jet. Those vars are too old skool. /be
Reporter | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•