You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the characters /,*, +, and - are legal in bare identifiers and at their start. This leads to a few ambiguous situations while parsing. Some examples:
-10/+10 are valid bare identifiers, at least in the node identifier position. How to parse things like -10=10 is a bit more difficult.
a/**/ is a valid bare identifier
a// is a valid bare identifier
It seems in keeping with the current rules about bare identifier start chars to add -/+ to the forbidden list. How to handle the latter case seems a bit tougher.
The text was updated successfully, but these errors were encountered:
After some more thinking it feels reasonable to disallow just / in bare identifiers, as it already seems a little odd to allow a character that would require escaping in an escaped string. Raw strings could still surprise people, since you could have documents like:
node r"Hello,
//Here comes the cool part
World"
which would be written "node Hello,\n\/\/Here comes the cool part\nWorld" if written with escaped strings. This still feels not entirely surprising because of the semantics of raw strings, and I don't see a way around it that would be less confusing.
Currently, the characters
/
,*
,+
, and-
are legal in bare identifiers and at their start. This leads to a few ambiguous situations while parsing. Some examples:-10
/+10
are valid bare identifiers, at least in the node identifier position. How to parse things like-10=10
is a bit more difficult.a/**/
is a valid bare identifiera//
is a valid bare identifierIt seems in keeping with the current rules about bare identifier start chars to add
-
/+
to the forbidden list. How to handle the latter case seems a bit tougher.The text was updated successfully, but these errors were encountered: