Lines Matching refs:token
350 token, end, lit = Lexer.lex('(', 0)
351 self.assertEqual(token, Token.LPAREN)
355 token, end, lit = Lexer.lex(')', 0)
356 self.assertEqual(token, Token.RPAREN)
360 token, end, lit = Lexer.lex('[', 0)
361 self.assertEqual(token, Token.LBRACKET)
365 token, end, lit = Lexer.lex(']', 0)
366 self.assertEqual(token, Token.RBRACKET)
370 token, end, lit = Lexer.lex('{', 0)
371 self.assertEqual(token, Token.LBRACE)
375 token, end, lit = Lexer.lex('}', 0)
376 self.assertEqual(token, Token.RBRACE)
380 token, end, lit = Lexer.lex(':', 0)
381 self.assertEqual(token, Token.COLON)
385 token, end, lit = Lexer.lex('=', 0)
386 self.assertEqual(token, Token.ASSIGN)
390 token, end, lit = Lexer.lex('+', 0)
391 self.assertEqual(token, Token.PLUS)
395 token, end, lit = Lexer.lex(',', 0)
396 self.assertEqual(token, Token.COMMA)
404 token, end, lit = Lexer.lex('+=', 0)
405 self.assertEqual(token, Token.ASSIGNPLUS)
413 token, end, lit = Lexer.lex(' ', 0)
414 self.assertEqual(token, Token.SPACE)
418 token, end, lit = Lexer.lex('\t', 0)
419 self.assertEqual(token, Token.SPACE)
423 token, end, lit = Lexer.lex('\r', 0)
424 self.assertEqual(token, Token.SPACE)
428 token, end, lit = Lexer.lex('\n', 0)
429 self.assertEqual(token, Token.SPACE)
433 token, end, lit = Lexer.lex('\n \r\t\n', 0)
434 self.assertEqual(token, Token.SPACE)
442 token, end, lit = Lexer.lex('// abcd', 0)
443 self.assertEqual(token, Token.COMMENT)
447 token, end, lit = Lexer.lex('// abcd\nnext', 0)
448 self.assertEqual(token, Token.COMMENT)
452 token, end, lit = Lexer.lex('/*a\nb*/', 0)
453 self.assertEqual(token, Token.COMMENT)
457 token, end, lit = Lexer.lex('/*a\n *b*/', 0)
458 self.assertEqual(token, Token.COMMENT)
462 token, end, lit = Lexer.lex('/*a**b*/', 0)
463 self.assertEqual(token, Token.COMMENT)
467 token, end, lit = Lexer.lex('/*a***b*/', 0)
468 self.assertEqual(token, Token.COMMENT)
472 token, end, lit = Lexer.lex('/**/', 0)
473 self.assertEqual(token, Token.COMMENT)
477 token, end, lit = Lexer.lex('/***/', 0)
478 self.assertEqual(token, Token.COMMENT)
482 token, end, lit = Lexer.lex('/**a*/', 0)
483 self.assertEqual(token, Token.COMMENT)
487 token, end, lit = Lexer.lex('/*a**/', 0)
488 self.assertEqual(token, Token.COMMENT)
492 token, end, lit = Lexer.lex('/***a*/', 0)
493 self.assertEqual(token, Token.COMMENT)
497 token, end, lit = Lexer.lex('/*a***/', 0)
498 self.assertEqual(token, Token.COMMENT)
506 token, end, lit = Lexer.lex('"a"', 0)
507 self.assertEqual(token, Token.STRING)
511 token, end, lit = Lexer.lex('`a\nb`', 0)
512 self.assertEqual(token, Token.STRING)
520 token, end, lit = Lexer.lex('ident', 0)
521 self.assertEqual(token, Token.IDENT)
529 token, end, lit = Lexer.lex('a "b"', 0)
530 self.assertEqual(token, Token.IDENT)
534 token, end, lit = Lexer.lex('a "b"', end)
535 self.assertEqual(token, Token.SPACE)
539 token, end, lit = Lexer.lex('a "b"', end)
540 self.assertEqual(token, Token.STRING)
559 self.assertEqual(lexer.token, Token.IDENT)
565 self.assertEqual(lexer.token, Token.IDENT)
571 self.assertEqual(lexer.token, Token.STRING)
577 self.assertEqual(lexer.token, Token.EOF)
588 self.assertEqual(lexer.token, Token.IDENT)
594 self.assertEqual(lexer.token, Token.EOF)