Closed rmarrowstone closed 2 months ago
Lexically, comments are whitespace. Per the grammar:
ws : WHITESPACE | INLINE_COMMENT | BLOCK_COMMENT ;
Note that comments are not allowed inside blobs, given that the
//
sequence is legitimate Base64 content.[Update: removed worries about blobs; I misread the grammar, which confusingly has distinct
ws
,WS
, andWHITESPACE
]
There is a related issue issue with ws
in the grammar: per the grammar a comment without whitespace should terminate a numeric_entity
. e.g.:
2004T// comment after year precise timestamp with no space
But per the spoken language description in the spec (which describes "stop" characters) and the implementations I've tested, this is not valid.
Add clarifying note that comments take precedence over operators in S-expressions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.