Confusion on nil and null in test cases

Hi @Dyr-El, you’re right that the Lox language and its Java implementation aren’t entirely consistent.

To clarify, null is not part of Lox itself, but a Java primitive that the author used in his implementation.

For context, here are the author’s test cases for tokens with null in the literal field.

He had to use null (Java) instead of nil (Lox) in the Java tests, and we’re stuck with null even if we use other languages.


A heads-up: you will encounter another inconsistency in the next stage (#lv1 Literals: Strings & Numbers). Be prepared!