Merge pull request #277 from crystal-ameba/crystal-1.6

Crystal 1.6 support
This commit is contained in:
Vitalii Elenhaupt 2022-10-14 21:09:02 +03:00 committed by GitHub
commit 80532da357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,7 @@ module Ameba::Rule::Style
break
when .ident?
next unless in_body
return unless token.value == :begin
return unless token.value == Crystal::Keyword::BEGIN
return token.location
when .op_lparen?
in_argument_list = true
@ -143,7 +143,7 @@ module Ameba::Rule::Style
end_loc = def_end_loc = nil
while !(token = lexer.next_token).type.eof?
next unless token.value == :end
next unless token.value == Crystal::Keyword::END
end_loc, def_end_loc = def_end_loc, token.location
end