Lines Matching refs:token
22 // A custom scanner to extract the token stream needed to parse valid
37 // Get current token.
39 // Get position of current token.
41 // Advance to the next token.
43 // Back up by one token.
62 // Debug only method to go from a token back to its name.
64 std::string Name(token_t token) const;
67 // Restores old position (token after that position). Note that it is not
78 // Methods to check if a token is an identifier and which scope.
81 static bool IsLocal(token_t token) { return token <= kLocalsStart; }
82 static bool IsGlobal(token_t token) { return token >= kGlobalsStart; }
85 static size_t LocalIndex(token_t token) {
86 DCHECK(IsLocal(token));
87 return -(token - kLocalsStart);
89 static size_t GlobalIndex(token_t token) {
90 DCHECK(IsGlobal(token));
91 return token - kGlobalsStart;
94 // Methods to check if the current token is a numeric literal considered an
147 size_t position_; // Corresponds to {token} position.