Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/parser/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ module Parser
# @!attribute [r] static_env
# @return [Parser::StaticEnvironment]
#
# @!attribute [r] version
# @return [Integer]
#
class Base < Racc::Parser
##
# Parses a string of Ruby code and returns the AST. If the source
Expand Down
9 changes: 9 additions & 0 deletions lib/parser/current.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,13 @@ def warn_syntax_deviation(feature, version)
require_relative 'ruby33'
CurrentRuby = Ruby33
end
# @!parse
# ##
# # @api public
# #
# # Parser for the running version of Ruby. NOTE: Supports only Ruby <= 3.3. To parse Ruby 3.4+, please use the prism gem. You can also use them in conjunction to support multiple versions using a backwards-compatible AST.
# #
# # @see https://ruby.github.io/prism/rb/docs/ruby_api_md.html prism gem documentation
# # @see https://github.com/whitequark/parser/blob/master/doc/PRISM_TRANSLATION.md Guide to using prism and parser together.
# class ::Parser::CurrentRuby < ::Parser::Base; end
end