Bug #631
closedripper does not follow change of parse.y
Description
=begin
-> を使ったステートメントを ripper が正しく解析できません。
irb(main):001:0> RUBY_RELEASE_DATE
=> "2008-10-10"
irb(main):002:0> require 'ripper'
=> true
irb(main):004:0> Ripper.lex("lambda{|x| xx}.call(3)")
=> [[[1, 0], :on_ident, "lambda"], [[1, 6], :on_lbrace, "{"], [[1, 7], :on_op, "
|"], [[1, 8], :on_ident, "x"], [[1, 9], :on_op, "|"], [[1, 10], :on_sp, " "], [[
1, 11], :on_ident, "x"], [[1, 12], :on_op, ""], [[1, 13], :on_ident, "x"], [[1,
14], :on_rbrace, "}"], [[1, 15], :on_period, "."], [[1, 16], :on_ident, "call"]
, [[1, 20], :on_lparen, "("], [[1, 21], :on_int, "3"], [[1, 22], :on_rparen, ")"
]]
irb(main):005:0> Ripper.lex("->(x){xx}.call(3)")
=> [[[1, 0], :on_tlambda, "->"], [[1, 2], :on_lparen, "("], [[1, 3], :on_ident,
"x"], [[1, 4], :on_rparen, ")"], [[1, 5], :on_lbrace, "{"], [[1, 6], :on_ident,
"x"], [[1, 7], :on_op, ""], [[1, 8], :on_ident, "x"], [[1, 9], :on_rbrace, "}"]
]
-> を使ったほうは無名ブロックの閉じブレースで解析が止まってます。
parse.y に手を入れる必要があるのでは?
primary → tLAMBDA lambda のあたりとか。
=end
Updated by matz (Yukihiro Matsumoto) about 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r19908.
=end