GuoYaxiang/craftinginterpreters_zh

第17章编译表达式,"并将其存储中previous字段中"修改->"并将其存储在previous字段中"

Closed this issue · 1 comments

Just like in jlox, it steps forward through the token stream. It asks the scanner for the next token and stores it for later use. Before doing that, t takes the old current token and stashes that in a previous field.That will come in handy later so that we can get at the lexeme after we match a token.

就像在jlox中一样,该函数向前通过标识流。它会向扫描器请求下一个词法标识,并将其存储起来以供后面使用。在此之前,它会获取旧的current标识,并将其存储中previous字段中。这在以后会派上用场,让我们可以在匹配到标识之后获得词素。

  • 加粗部分修改并将其存储在previous字段中

可以自己fork工程,修改以后提交PR哦