Curiosity on Abstract Format for try_catch clauses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Curiosity on Abstract Format for try_catch clauses

Paul Davis-3
Howdy,

I've been working on a tool using erl_scan, erl_parse, and friends
lately and stumbled over an oddity in the Abstract Format for
try_catch clauses:

https://github.com/erlang/otp/blob/OTP-19.3.5/lib/stdlib/src/erl_parse.yrl#L456-L464

For some reason there's a {var, Anno, '_'} expression inserted in the
Patterns for each try_catch clause and it left me scratching my head
what it was doing there. I haven't read enough to what happens
afterwords but my only guess is that there's something internally that
gets matched with the ignore pattern. Given that its ignored I figured
its probably historical but thought it curious enough to ask if anyone
had some insight on that.

I did try and look through the history but that bit of Abstract Format
is nearly unchanged since the first commit of R13B03 in the public
repository:

https://github.com/erlang/otp/blob/84adefa331c4159d432d22840663c38f155cd4c1/lib/stdlib/src/erl_parse.yrl#L415-L423

Thanks,
Paul
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...