Skip to content

Commit

Permalink
Remove redundant conditional (#12196)
Browse files Browse the repository at this point in the history
`@token.type.ident?` must be true in the block.
  • Loading branch information
potomak authored Jul 15, 2022
1 parent bf4009d commit 305f081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/crystal/syntax/parser.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3911,7 +3911,7 @@ module Crystal
if @token.keyword? && invalid_internal_name?(@token.value)
invalid_internal_name = @token.dup
end
external_name = @token.type.ident? ? @token.value.to_s : ""
external_name = @token.value.to_s
next_token
else
external_name = parse_string_without_interpolation("external name")
Expand Down

0 comments on commit 305f081

Please sign in to comment.