From 920f9be9aa31d657e7e35a79a47a0c264f60ef40 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Wed, 25 Sep 2019 13:12:54 -0400 Subject: [PATCH] Explicitly state that trailing underscores are banned (#12257) It was explicit in the BNF, but the English text implied it was allowed. --- doc/manual.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/manual.rst b/doc/manual.rst index da4517681..5116b3bda 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -249,8 +249,11 @@ Identifiers & Keywords ---------------------- Identifiers in Nim can be any string of letters, digits -and underscores, beginning with a letter. Two immediate following -underscores ``__`` are not allowed:: +and underscores, with the following restrictions: + +* begins with a letter +* does not end with an underscore ``_`` +* two immediate following underscores ``__`` are not allowed:: letter ::= 'A'..'Z' | 'a'..'z' | '\x80'..'\xff' digit ::= '0'..'9'