Skip to content

Commit

Permalink
fix: 🐛 parser detect comment bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YYCoder committed Nov 17, 2021
1 parent 161bccd commit 8ce4489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8ce4489

Please sign in to comment.