Skip to content

Commit 20375a1

Browse files
authored
align prose text on initial identifier characters with grammar (#464)
1 parent 91cd421 commit 20375a1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

SPEC.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,17 @@ The following characters cannot be the first character in an
342342
* Any decimal digit (0-9)
343343
* Any [non-identifier characters](#non-identifier-characters)
344344

345-
Additionally, the `-` character can only be used as an initial character if
346-
the second character is *not* a digit. This allows identifiers to look like
347-
`--this`, and removes the ambiguity of having an identifier look like a
348-
negative number.
345+
Additionally, the following initial characters impose limitations on subsequent
346+
characters:
347+
348+
* the `+` and `-` characters can only be used as an initial character if
349+
the second character is *not* a digit. If the second character is `.`, then
350+
the third character must *not* be a digit.
351+
* the `.` character can only be used as an initial character if
352+
the second character is *not* a digit.
353+
354+
This allows identifiers to look like `--this` or `.md`, and removes the
355+
ambiguity of having an identifier look like a number.
349356

350357
#### Non-identifier characters
351358

0 commit comments

Comments
 (0)