Lines Matching refs:Lexer
5 class Lexer(object): class
39 if token_type not in {Lexer.NEWLINE}:
43 self.scan_over_(Lexer.CHAR_WHITESPACE_)
58 return (Lexer.NEWLINE, None, location)
63 return (Lexer.NEWLINE, None, location)
69 return (Lexer.STRING, text[start + 1:self.pos_ - 1], location)
73 if cur_char in Lexer.CHAR_NAME_START_:
75 self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
77 return (Lexer.NAME, token, location)
78 if cur_char in Lexer.CHAR_DIGIT_:
79 self.scan_over_(Lexer.CHAR_DIGIT_)
80 return (Lexer.NUMBER, int(text[start:self.pos_], 10), location)
81 if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
83 self.scan_over_(Lexer.CHAR_DIGIT_)
84 return (Lexer.NUMBER, int(text[start:self.pos_], 10), location)