Project

General

Profile

« Previous | Next » 

Revision e165d92d

Added by nicholas a. evans 10 months ago

[ruby/rdoc] Drop reimplementation of Ripper lex state
(https://github.com/ruby/rdoc/pull/1118)

  • Drop reimplementation of Ripper lex state

This code was for ruby 2.4 compatibility, but rdoc dropped support for
ruby 2.4 about three years ago, in f480b970c. This code was almost half
of the lines of code in rdoc/parser/ripper_state_lex.

  • Remove unused Ripper constants and const_defined?

This was mostly copied from the diff in @st0012's PR comment. The
remaining constants have been updated to get their value directly from
Ripper.

Co-authored-by: Stan Lo

  • Use Ripper::EXPR_LABEL directly

Since this is only used from outside RipperStateLex, there's no longer
any benefit to using the indirect reference rather than just going
straight to Ripper.


https://github.com/ruby/rdoc/commit/dd8c216263

Co-authored-by: Stan Lo