This repository has been archived by the owner. It is now read-only.

Fix 'Not enough argument definitions' exception when parsing less usual constructs #187

Merged
merged 2 commits into from Jun 27, 2016

Conversation

Projects
None yet
2 participants
@mvidner
Copy link
Contributor

mvidner commented Jun 27, 2016

Fixes #173.

Of course, (regexp ...) (dstr ...) and (yield) are actually pretty common. The virtual machine has ignored these constructs but it has worked in most cases because child nodes provided the value.

puts //            # (regexp (regopt))
/foo/i             # (regexp (str "foo") (regopt :i))
puts <<EOS         # (dstr)
EOS
puts "foo#{bar}"   # (dstr (str "foo") (begin (send nil :bar)))

mvidner added some commits Jun 27, 2016

Test analyzing more language constructs.
(regexp), (yield), (dstr)
//, yield, <<EOS
EOS
Recognize more language constructs: regexp, dstr, yield (fixes #173).
Of course, (regexp ...) (dstr ...) and (yield) are actually pretty common.
The virtual machine has ignored these constructs but it has worked
in most cases because child nodes provided the value.

```rb
puts //            # (regexp (regopt))
/foo/i             # (regexp (str "foo") (regopt :i))
puts <<EOS         # (dstr)
EOS
puts "foo#{bar}"   # (dstr (str "foo") (begin (send nil :bar)))
```

@YorickPeterse YorickPeterse merged commit c9a3e27 into YorickPeterse:master Jun 27, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@YorickPeterse

This comment has been minimized.

Copy link
Owner

YorickPeterse commented Jun 27, 2016

Thanks!

@mvidner mvidner deleted the mvidner:not-enough-argument-definitions branch Jun 27, 2016

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