From 1bf4d740faad46299f55bd4711f96b850663156e Mon Sep 17 00:00:00 2001 From: Basile Henry Date: Sun, 28 Aug 2022 22:07:17 +0200 Subject: [PATCH] Allow "empty" single line comments in the spec (#234) As I read the grammar in the spec, `"//"` wouldn't parse as a single-line-comment as it requires as least one non-newline character after the slashes. --- SPEC.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPEC.md b/SPEC.md index f625ba1..01d7570 100644 --- a/SPEC.md +++ b/SPEC.md @@ -493,7 +493,7 @@ bom := '\u{FEFF}' unicode-space := See Table (All White_Space unicode characters which are not `newline`) -single-line-comment := '//' ^newline+ (newline | eof) +single-line-comment := '//' ^newline* (newline | eof) multi-line-comment := '/*' commented-block commented-block := '*/' | (multi-line-comment | '*' | '/' | [^*/]+) commented-block ```