From 8ce44892cc75881cc0ca7c2adc07cabfe06300db Mon Sep 17 00:00:00 2001 From: Markey Date: Wed, 17 Nov 2021 16:18:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20parser=20detect=20comment?= =?UTF-8?q?=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.go b/parser.go index 965885c..a449ff2 100644 --- a/parser.go +++ b/parser.go @@ -222,7 +222,7 @@ func (p *Parser) nextNonWhitespace() (res *Token) { r := p.peek() // see if it's a comment - if string(r) == "/" { + if string(r) == "/" || string(r) == "#" { p.scanner.Next() // consume comment first unicode character isComment, commentType := p.isComment(r) if isComment { @@ -265,7 +265,7 @@ func (p *Parser) peekNonWhitespace() (r rune) { r = p.peek() // see if it's a comment - if string(r) == "/" { + if string(r) == "/" || string(r) == "#" { p.scanner.Next() // consume comment first unicode character isComment, commentType := p.isComment(r) if isComment {