Let’s Understand Chrome V8 — Chapter 5: Compilation Parser
Too Long; Didn't ReadIn this article, we’ll talk about the source code and important data structures of V8’s JS parser. In V8, the parser is the next stage of the scanner, and the token output by the scanner is the input of the parser. During compiling JS, the scanner will frequently call the scanner to generate the token word. In the third line of code, peek() takes out the type of the Token::FUNCTION, so the type obtained by the peek is Token::FCTION. In our case, we need to determine which FunctionKind the function is.