Crystal 1.6 support

This commit is contained in:
Vitalii Elenhaupt 2022-10-14 20:53:52 +03:00
parent 97acedaec8
commit d2fbf484f4
No known key found for this signature in database
GPG key ID: CD0BF17825928BC0

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