let numbers be written with decimals

This commit is contained in:
Neemek 2024-10-09 09:36:24 +02:00
parent 9f17543d3e
commit 898be71f05
Signed by: neemek
GPG key ID: 28360A8951CD0E9B

View file

@ -291,6 +291,13 @@ func (l *Lexer) NextToken() (Token, error) {
l.advance()
}
// if the number has a float-part
if l.accept('.') {
for unicode.IsDigit(l.peek()) {
l.advance()
}
}
return l.makeToken(TokenNumber), nil
}