munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.75k stars 1.03k forks source link

Incorrect text surrounding code segment in 13.3.3 #990

Open dellis23 opened 3 years ago

dellis23 commented 3 years ago

In 13.3.3, toward the end of the section, the book mentions adding SUBCLASS to the ClassType enum. The surrounding text is incorrect, however.

It shows:

    NONE,
    SUBCLASS
}

It should read:

    CLASS,
    SUBCLASS
}

I believe this is because CLASS and SUBCLASS are both grouped into the same code segment, class-type-subclass here, even though they are added in different places in the book. I don't know much about the syntax used for parsing though, so that's just a guess.