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

Parse more stabby procs without parentheses #24

Closed FnControlOption closed 2 years ago

FnControlOption commented 2 years ago

Parse parentheses-less stabby proc with first argument as:

-> **foo { 1 }
-> &foo { 1 }
-> foo = bar { 1 }
-> foo: bar { 1 }
-> foo: { 1 }

Also parse parentheses-less def with block arg:

def foo &a; end
seven1m commented 2 years ago

Nice