jruby / jruby-parser

JRuby's parser customized for IDE usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsing rescue statements is wrong for lexical representation

enebo opened this issue · comments

  begin
    puts "test"
  rescue Exception => hello
    puts hello
  end

This snippet will create a block node and then for hello it will make a localasgnnode and the value will be $!. We definitely do not want the AST to contain $! since it is not actually in the source and we cannot neccesarily use localasgnnode since it implies assignment. We do need to declare this as a var for things to properly parse, so I think this is implying a new type of node perhaps.