Skip to content

Commit

Permalink
Javascript: parseFloat does not take a base parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
zoren authored and kanaka committed Aug 6, 2024
1 parent b50380f commit ec15d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impls/js/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function read_atom (reader) {
if (token.match(/^-?[0-9]+$/)) {
return parseInt(token,10) // integer
} else if (token.match(/^-?[0-9][0-9.]*$/)) {
return parseFloat(token,10); // float
return parseFloat(token); // float
} else if (token.match(/^"(?:\\.|[^\\"])*"$/)) {
return token.slice(1,token.length-1)
.replace(/\\(.)/g, function (_, c) { return c === "n" ? "\n" : c})
Expand Down

0 comments on commit ec15d21

Please sign in to comment.