Lines Matching refs:token

370             token = Token(kind, self._line, self._line_pos + 1,
372 self._next_token = token
374 return token
378 token = self.peek()
379 if not token:
381 self._line_start = token.kind == TK.NEWLINE
385 return token
389 token = self.lex()
390 if token.kind not in match_set:
392 return token
583 token = self._lexer.peek()
584 if not token:
588 if token.kind == TK.EOF:
590 elif token.kind == TK.NEWLINE:
592 elif token.kind == TK.IDENT:
593 ident = token.value
617 token = self._lexer.peek()
618 if token:
619 if token.kind in end_set:
621 elif token.kind != TK.IDENT:
624 token = self._lexer.lex_path()
625 result.append(token.value)
637 token = self._lexer.lex_string()
638 value = token.value
664 token = self._lexer.peek()
665 if not token or token.kind != TK.SPACE:
683 token = self._lexer.lex_match({TK.IDENT})
684 assert token.value == 'build'
692 token = self._lexer.peek()
693 if token.kind == TK.PIPE:
715 token = self._lexer.peek()
716 if token.kind == TK.PIPE:
723 token = self._lexer.peek()
724 if token.kind == TK.PIPE2:
763 token = self._lexer.lex_match({TK.IDENT})
764 assert token.value == 'rule'
782 token = self._lexer.lex_match({TK.IDENT})
783 assert token.value == 'default'
802 token = self._lexer.lex_match({TK.IDENT})
803 assert token.value == 'pool'
807 token = self._lexer.lex()
808 assert token.kind == TK.IDENT
809 pool.name = token.value
826 token = self._lexer.lex_match({TK.IDENT})
827 assert token.value in {'include', 'subninja'}
828 wrap_env = token.value == 'subninja'
830 token = self._lexer.lex_path()
831 path = eval_string(token.value, self._env) # XXX: Check lookup order