quick maps makes later IN unrecognized #195

Closed
vendethiel opened this Issue Dec 31, 2012 · 6 comments

Comments

Projects
None yet
3 participants
Contributor

vendethiel commented Dec 31, 2012

coco -le "for a then b; a in b"
NEWLINE:\n ID:a THEN ID:b NEWLINE:; ID:a IN ID:b NEWLINE:\n

probably because @seenfor doesn't change

gkz/LiveScript#245

Owner

satyr commented Jan 1, 2013

Ow.

satyr closed this in c7c745b Jan 3, 2013

Contributor

vendethiel commented Jan 12, 2013

Note that you have no further problem with that because you didn't enabled quick-post-for. was that intentional ?

Owner

satyr commented Jan 12, 2013

Yes, it's parsed differently from other loops, being a complement of the proposed *. operator and a variant of with.

E.g. you can directly dot-access it:

for [0 1 2]
  &*3
.concat 4 5
Contributor

vendethiel commented Jan 12, 2013

Yes, this is really nice. Thought I could go a bit further tho.

for [0 1 2]
  &*3
|> &length

This can get pretty nasty, eg in this toml parser.
Took quite some time to figure out why line ~100 was erroring, but it appeared to be caused by the for key => on line ~50. The solution was to put the of test in a new function and place it above line 50 (on line 43, to be precise), but it's a rather expensive error if you don't know what might be causing it :s

Owner

satyr commented Mar 2, 2013

Sorry about that. Will soon release 0.9.1 with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment