ruby-changes:56233
From: Nobuyoshi <ko1@a...>
Date: Thu, 27 Jun 2019 17:01:40 +0900 (JST)
Subject: [ruby-changes:56233] Nobuyoshi Nakada: 7b716bc52a (trunk): Show the parser states in pretty_print too
https://git.ruby-lang.org/ruby.git/commit/?id=7b716bc52a From 7b716bc52a5d4d000a0cee0841109c243cfcf6db Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 27 Jun 2019 16:57:31 +0900 Subject: Show the parser states in pretty_print too diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 3a2138f..05af844 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -74,6 +74,8 @@ class Ripper https://github.com/ruby/ruby/blob/trunk/ext/ripper/lib/ripper/lexer.rb#L74 q.breakable q.text("#{event}@#{pos[0]}:#{pos[1]}") q.breakable + q.text(state) + q.breakable q.text("token: ") tok.pretty_print(q) if message -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/