Open Sidewinder1138 opened 2 years ago
I also had to forward declare isFalsey: static bool isFalsey(Value value);
In Chapter 21, I found I needed to forward declare identifierConstant()
in compiler.c as well.
You must have mixed things up somewhere. If you followed the placement guides strictly, none of those functions need a forward declare.
@mcfriend99 Ok, I just wanted to be sure it was my mistake, thx.
In Ch18, the book tells me to add the
static Value peek(int distance)
function "after pop()" in vm.c. Of course, peek() is called earlier in that file, so it won't compile without a forward declaration. I added one and things compile and run just fine, but it seemed odd that the book text didn't mention it (unless I missed it somehow).