Skip to content

Commit

Permalink
Improve the description of identifier syntax in the manual
Browse files Browse the repository at this point in the history
Explicitly mention the validity of dashes and leading underscores.

Fixes #1837
  • Loading branch information
vkleen committed Mar 7, 2024
1 parent 7003415 commit 87928cb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions doc/manual/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ slug: syntax

## Identifiers

Nickel identifiers start with an alphabetic character, followed by zero or more
alphanumeric characters, `_` (underscores) or `'` (single quotes). For example,
`this-isn't-invalid` is a valid identifier.
Nickel identifiers start with an optional underscore `_` followed by an
alphabetic character (`a` to `z` or `A` to `Z`). They are then followed by
zero or more alphanumeric characters (alphabetic characters or digits `0` to
`9`), `_` (underscores), `-` (dashes) or `'` (single quotes). For example,
`_This-isn't_invalid` is a valid identifier.

## Simple values

Expand Down

0 comments on commit 87928cb

Please sign in to comment.