ruby-changes:58757
From: Yuichiro <ko1@a...>
Date: Wed, 13 Nov 2019 09:53:02 +0900 (JST)
Subject: [ruby-changes:58757] ae33f93836 (master): Update comment of Ripper.lex
https://git.ruby-lang.org/ruby.git/commit/?id=ae33f93836 From ae33f93836b556f36d5ffc4a7bca2c1b379c56d8 Mon Sep 17 00:00:00 2001 From: Yuichiro Kaneko <yui-knk@r...> Date: Wed, 13 Nov 2019 09:50:58 +0900 Subject: Update comment of Ripper.lex This is follow up of 1f7cb4bee9. diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 73933ca..9f613c3 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -30,16 +30,16 @@ class Ripper https://github.com/ruby/ruby/blob/trunk/ext/ripper/lib/ripper/lexer.rb#L30 # require 'pp' # # pp Ripper.lex("def m(a) nil end") - # #=> [[[1, 0], :on_kw, "def", Ripper::EXPR_FNAME ], - # [[1, 3], :on_sp, " ", Ripper::EXPR_FNAME ], - # [[1, 4], :on_ident, "m", Ripper::EXPR_ENDFN ], - # [[1, 5], :on_lparen, "(", Ripper::EXPR_LABEL | Ripper::EXPR_BEG], - # [[1, 6], :on_ident, "a", Ripper::EXPR_ARG ], - # [[1, 7], :on_rparen, ")", Ripper::EXPR_ENDFN ], - # [[1, 8], :on_sp, " ", Ripper::EXPR_BEG ], - # [[1, 9], :on_kw, "nil", Ripper::EXPR_END ], - # [[1, 12], :on_sp, " ", Ripper::EXPR_END ], - # [[1, 13], :on_kw, "end", Ripper::EXPR_END ]] + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] # def Ripper.lex(src, filename = '-', lineno = 1) Lexer.new(src, filename, lineno).lex -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/