Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephTLyons committed Dec 7, 2024
1 parent b990cc3 commit cd7d725
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/parse_error.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub type ParseError {
/// For more information on safe integers and their range, see:
/// - [MDN: Number.MAX_SAFE_INTEGER](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)
/// - [MDN: Number.MIN_SAFE_INTEGER](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER)
NotASafeInteger(value: String)
NotASafeInteger(integer_string: String)
}
// TODO: An error for when the float is too big and cannot be represented on (JavaScript? Both targets?)
// Or should the error be more generalized to not specify the target?
4 changes: 2 additions & 2 deletions test/helpers.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ pub fn error_to_string(error: ParseError) -> String {
<> "\" at index: "
<> index |> int.to_string
InvalidBaseValue(base) -> "invalid base value: " <> base |> int.to_string
NotASafeInteger(value) ->
NotASafeInteger(integer_string) ->
"integer value \""
<> value
<> integer_string
<> "\" cannot safely be represented on the JavaScript target"
}
}

0 comments on commit cd7d725

Please sign in to comment.