number literals in lox
for Lox, number literals are floating point at runtime, but decimal and integer literals are supported.
A number literal is a series of digits optionally followed by a
.and one or more trailing digits.
Since we look only for a digit to start a number, that means
-123is not a number literal. Instead,-123, is an expression that applies-to the number literal123.
Tags