ForExpr
From Erights
(Difference between revisions)
Kevin Reid (Talk | contribs) |
(→Tests) |
||
Line 21: | Line 21: | ||
* <var>collection</var> may not use nouns bound by <var>optKeyPattern</var> or <var>valuePattern</var>, or vice versa. | * <var>collection</var> may not use nouns bound by <var>optKeyPattern</var> or <var>valuePattern</var>, or vice versa. | ||
- | + | C9KOXf Got it! Thanks a lot again for hlepnig me out! | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Revision as of 10:07, 20 April 2011
ForExpr is a nonkernel node which executes code for each element in a collection or other object implementing iterate/1.
"for" (optKeyPattern "=>")? valuePattern "in" collection "{" body "}" ({optBreakCatch an EMatcher}: "catch" pattern "{" expr "}")?
XXX We need to formalize the grammar definitions used in our spec
Fields
- optKeyPattern :nullOk[Pattern]
- valuePattern :Pattern
- collection :nullOk[EExpr]
- body :EExpr
- optBreakCatch :nullOk[EMatcher]
Expansion
XXX Define the expansion of ForExpr
Static constraints
- collection may not use nouns bound by optKeyPattern or valuePattern, or vice versa.
C9KOXf Got it! Thanks a lot again for hlepnig me out!