summaryrefslogtreecommitdiff
path: root/ext/ripper/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-27 16:57:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-27 16:58:06 +0900
commit7b716bc52a5d4d000a0cee0841109c243cfcf6db (patch)
tree41017b9c36b813f80339525f9bf3b145f5cb83f1 /ext/ripper/lib
parent2fd03fd7e651d5f0bf78e315eafdde5468c1de53 (diff)
Show the parser states in pretty_print too
Diffstat (limited to 'ext/ripper/lib')
-rw-r--r--ext/ripper/lib/ripper/lexer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index 3a2138f310c..05af8445fce 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -74,6 +74,8 @@ class Ripper
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