Skip to content

Commit

Permalink
NumLiteral -> NumberLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
vkleen committed Mar 30, 2023
1 parent 7f6f529 commit 897e9e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions stdlib/string.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
else
%blame% (%label_with_message% "not a string" l),

NumLiteral
NumberLiteral
| doc m%"
Enforces that the value is a string that represents a numerical value.

# Examples

```nickel
("+1.2" | NumLiteral) =>
("+1.2" | NumberLiteral) =>
"+1.2"
("5" | NumLiteral) =>
("5" | NumberLiteral) =>
"5"
(42 | NumLiteral) =>
(42 | NumberLiteral) =>
error
```
"%
Expand All @@ -51,7 +51,7 @@
if is_num_literal s then
s
else
%blame% (%label_with_message% "invalid num literal" l)
%blame% (%label_with_message% "invalid number literal" l)
else
%blame% (%label_with_message% "not a string" l),

Expand Down
6 changes: 3 additions & 3 deletions tests/integration/pass/stdlib_string_contracts.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ let {check, ..} = import "lib/assert.ncl" in
("false" | string.BoolLiteral) == "false",

# string.NumLiteral
("+1.2" | string.NumLiteral) == "+1.2",
("-1.2" | string.NumLiteral) == "-1.2",
("9001" | string.NumLiteral) == "9001",
("+1.2" | string.NumberLiteral) == "+1.2",
("-1.2" | string.NumberLiteral) == "-1.2",
("9001" | string.NumberLiteral) == "9001",

# string.Character
# single ascii chars
Expand Down

0 comments on commit 897e9e4

Please sign in to comment.