Skip to content

Commit

Permalink
+ ruby28.y: branch parser (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Apr 19, 2020
1 parent 9ea976c commit f6e35c9
Show file tree
Hide file tree
Showing 11 changed files with 2,965 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -29,5 +29,6 @@ lib/parser/ruby24.rb
lib/parser/ruby25.rb
lib/parser/ruby26.rb
lib/parser/ruby27.rb
lib/parser/ruby28.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb
1 change: 1 addition & 0 deletions Rakefile
Expand Up @@ -32,6 +32,7 @@ GENERATED_FILES = %w(lib/parser/lexer.rb
lib/parser/ruby25.rb
lib/parser/ruby26.rb
lib/parser/ruby27.rb
lib/parser/ruby28.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb)

Expand Down
1 change: 1 addition & 0 deletions lib/parser/all.rb
Expand Up @@ -10,3 +10,4 @@
require 'parser/ruby25'
require 'parser/ruby26'
require 'parser/ruby27'
require 'parser/ruby28'
9 changes: 9 additions & 0 deletions lib/parser/current.rb
Expand Up @@ -83,6 +83,15 @@ def warn_syntax_deviation(feature, version)
require 'parser/ruby27'
CurrentRuby = Ruby27

when /^2\.8\./
current_version = '2.8.0-dev'
if RUBY_VERSION != current_version
warn_syntax_deviation 'parser/ruby28', current_version
end

require 'parser/ruby28'
CurrentRuby = Ruby28

else # :nocov:
# Keep this in sync with released Ruby.
warn_syntax_deviation 'parser/ruby27', '2.7.x'
Expand Down

0 comments on commit f6e35c9

Please sign in to comment.