         end
 
       if pos >= 0 do
-        entries =
-          case :binary.split(codepoints, "..") do
-            [<<codepoint::4-binary, _::binary>>] ->
-              [String.to_integer(codepoint, 16)]
-
-            [first, <<last::4-binary, _::binary>>] ->
-              Enum.to_list(String.to_integer(last, 16)..String.to_integer(first, 16))
-          end
-
-        put_elem(acc, pos, entries ++ elem(acc, pos))
+        put_elem(acc, pos, range_to_codepoints.(range) ++ elem(acc, pos))
       else
         acc
       end

  ##
  ## First let's load all characters that we will allow in identifiers
  ##

  {letter_uptitlecase, start, continue, _} =
    Path.join(__DIR__, "UnicodeData.txt")

    |> File.read!()
    |> String.split(["\r\n", "\n"], trim: true)
    |> Enum.flat_map(fn line ->
      with [range, type_with_comments] <- :binary.split(line, ";"),
           [types, _comments] <- :binary.split(type_with_comments, "#"),
           types = String.split(types, " ", trim: true),
           true <- "Inclusion" not in types and "Recommended" not in types do
        range_to_codepoints.(range)
      else
        _ -> []
      end
