Closed Bug 502970 Opened 15 years ago Closed 15 years ago

add iterate_vars() convenience method to dehydra.js

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dwitte, Assigned: dwitte)

References

Details

Attachments

(1 file)

Attached patch patch + testSplinter Review
      No description provided.
Attachment #387338 - Flags: review?(tglek)
Attachment #387338 - Flags: review?(tglek) → review+
Blocks: 502775
http://hg.mozilla.org/rewriting-and-analysis/dehydra/rev/4e6f9a956004
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment on attachment 387338 [details] [diff] [review]
patch + test

>+    for each(let va in v.assign)
>+    for each (ret in var_iter(va))
>+    yield ret

What's with the lack of indentation (and semicolon, for that matter)?

Also, space before ( after each in second line but not on first nit.

Bug: missing let makes ret a global var!

>+
>+    for each(let vp in v.arguments)
>+    for each (ret in var_iter(vp))
>+    yield ret
>+
>+    for each (let vi in v.inits)
>+    for each (ret in var_iter(vi))
>+    yield ret
>   }

etc.

/be
Thanks for comments - tweaks pushed as http://hg.mozilla.org/rewriting-and-analysis/dehydra/rev/583e9896d0ec.
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: