natalie-lang / natalie_parser

NatalieParser is a zero-dependency, from-scratch, hand-written recursive descent parser for the Ruby Programming Language.
MIT License
63 stars 8 forks source link

Use Precedence::LOWEST for block pass #18

Closed richardboehme closed 2 years ago

richardboehme commented 2 years ago

It seems like we should use a lower precedence to correctly pass expressions as blocks. For example:

[].map(&5.method(:+))

should be call #method on 5 and pass this as a block.