#195 strikes again #200

Closed
vendethiel opened this Issue Feb 3, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@vendethiel
Contributor

vendethiel commented Feb 3, 2013

Got bitten by this just now ... It's basically the same as #195
Just this :
for get(a in b) then or for [get a in b] then
Of course implicit call isn't applicable here, but I thought we may count how deep we are in {} (I don't think we even need to differentiate between those) before checking inFor.

@satyr

This comment has been minimized.

Show comment Hide comment
@satyr

satyr Feb 4, 2013

Owner

This has always been the case (just wasn't practical before quick map). You can't use binary in/of right after for.

I thought we may count how deep we are in {} (I don't think we even need to differentiate between those) before checking inFor.

We'd need separate flags for each nesting level to handle this.

Owner

satyr commented Feb 4, 2013

This has always been the case (just wasn't practical before quick map). You can't use binary in/of right after for.

I thought we may count how deep we are in {} (I don't think we even need to differentiate between those) before checking inFor.

We'd need separate flags for each nesting level to handle this.

@vendethiel

This comment has been minimized.

Show comment Hide comment
@vendethiel

vendethiel Feb 4, 2013

Contributor

May I ask why? I thought this would not be the case as they need to be balanced anyway.

Contributor

vendethiel commented Feb 4, 2013

May I ask why? I thought this would not be the case as they need to be balanced anyway.

@satyr

This comment has been minimized.

Show comment Hide comment
@satyr

satyr Feb 4, 2013

Owner

Because they can nest, e.g.:

for (
  for a in b => c
).p of xs => ...
Owner

satyr commented Feb 4, 2013

Because they can nest, e.g.:

for (
  for a in b => c
).p of xs => ...
@vendethiel

This comment has been minimized.

Show comment Hide comment
@vendethiel

vendethiel Feb 4, 2013

Contributor

Ah, right. No idea how to (cleanly) handle that (does not look like it's working currently tbh, havn't tested master yet). I was talking about depth of ()[]{} but that's definitely a failing case here :(. Except with an array which counts balance count, no idea (like =>) but that seems horrible for such an edge case.

case \for
  this@@inFor.push 0
  #...
case \(
  if @inFor
    that[*-1]++
  #...
case \)
  if @inFor
    that[*-1]--
  #...
case \in
  if @inFor
    if that[*-1] #we're in ()[]{}
      tag = \RELATION
    else
      tag = \IN
      that.pop!
  #...
### probably doesn't handle `in`/`of` in bodies. 
Contributor

vendethiel commented Feb 4, 2013

Ah, right. No idea how to (cleanly) handle that (does not look like it's working currently tbh, havn't tested master yet). I was talking about depth of ()[]{} but that's definitely a failing case here :(. Except with an array which counts balance count, no idea (like =>) but that seems horrible for such an edge case.

case \for
  this@@inFor.push 0
  #...
case \(
  if @inFor
    that[*-1]++
  #...
case \)
  if @inFor
    that[*-1]--
  #...
case \in
  if @inFor
    if that[*-1] #we're in ()[]{}
      tag = \RELATION
    else
      tag = \IN
      that.pop!
  #...
### probably doesn't handle `in`/`of` in bodies. 

@satyr satyr closed this in 0fd717f Mar 2, 2013

@goto-bus-stop

This comment has been minimized.

Show comment Hide comment
@goto-bus-stop

goto-bus-stop Mar 2, 2013

Thanks a lot :)

Thanks a lot :)

@vendethiel

This comment has been minimized.

Show comment Hide comment
@vendethiel

vendethiel Mar 2, 2013

Contributor

gorgeous

Contributor

vendethiel commented Mar 2, 2013

gorgeous

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