fix multiline comments

This commit is contained in:
Neemek 2024-10-09 14:50:07 +02:00
parent c103307469
commit 45b4528e73
Signed by: neemek
GPG key ID: 28360A8951CD0E9B

View file

@ -185,9 +185,9 @@ func (l *Lexer) NextToken() (Token, error) {
case '*': case '*':
return l.makeToken(TokenStar), nil return l.makeToken(TokenStar), nil
case '/': case '/':
if l.match('*') { if l.accept('*') {
for !l.isAtEnd() { for !l.isAtEnd() {
if l.match('*') && l.match('/') { if l.accept('*') && l.accept('/') {
break break
} }
l.advance() l.advance()