@@ -40,9 +40,9 @@ static const char *const luaX_tokens [] = {
40
40
"return" , "then" , "true" , "until" , "while" ,
41
41
".." , "..." , "==" , ">=" , "<=" , "~=" , "!=" , "::" ,
42
42
"<eof>" , "<number>" , "<name>" , "<string>" , "?" ,
43
- "<eol>" , "@@" , "^^" , "<<" , ">>" , ">>>" ,
44
- "+=" , "-=" , "*=" , "/=" , "%=" , "^=" , "\\=" ,
45
- "& =" , "| =" , "^^ =" , "<< =" , ">> =" , ">>> =" , "..=" ,
43
+ "<eol>" , "@@" , "^^" , "<<" , ">>" , ">>>" , "<<>" , ">><" ,
44
+ "+=" , "-=" , "*=" , "/=" , "%=" , "^=" , "\\=" , "&=" , "|=" ,
45
+ "^^ =" , "<< =" , ">> =" , ">>> =" , "<<> =" , ">>< =" , "..=" ,
46
46
};
47
47
48
48
@@ -495,13 +495,16 @@ static int llex (LexState *ls, SemInfo *seminfo) {
495
495
if (ls -> current != '=' ) return '=' ;
496
496
else { next (ls ); return TK_EQ ; }
497
497
}
498
- case '<' : { /* '<=' or '<' or '<<=' or '<<' */
498
+ case '<' : { /* '<=' or '<' or '<<=' or '<<' or '<<>=' or '<<>' */
499
499
next (ls );
500
500
if (ls -> current == '=' ) { next (ls ); return TK_LE ; }
501
501
else if (ls -> current != '<' ) return '<' ;
502
502
next (ls );
503
503
if (ls -> current == '=' ) { next (ls ); return TK_SHLE ; }
504
- else return TK_SHL ;
504
+ else if (ls -> current != '>' ) return TK_SHL ;
505
+ next (ls );
506
+ if (ls -> current == '=' ) { next (ls ); return TK_ROTLE ; }
507
+ else return TK_ROTL ;
505
508
}
506
509
case '^' : { /* '^=' or '^' or '^^' or '^^=' */
507
510
next (ls );
@@ -511,12 +514,17 @@ static int llex (LexState *ls, SemInfo *seminfo) {
511
514
if (ls -> current == '=' ) { next (ls ); return TK_BXORE ; }
512
515
else return TK_BXOR ;
513
516
}
514
- case '>' : { /* '>=' or '>' or '>>=' or '>>' or '>>>=' or '>>>' */
517
+ case '>' : { /* '>=', '>', '>>=', '>><=', >><', '>>', '>>>=', or '>>>' */
515
518
next (ls );
516
519
if (ls -> current == '=' ) { next (ls ); return TK_GE ; }
517
520
else if (ls -> current != '>' ) return '>' ;
518
521
next (ls );
519
522
if (ls -> current == '=' ) { next (ls ); return TK_SHRE ; }
523
+ else if (ls -> current == '<' ) {
524
+ next (ls );
525
+ if (ls -> current == '=' ) { next (ls ); return TK_ROTRE ; }
526
+ else return TK_ROTR ;
527
+ }
520
528
else if (ls -> current != '>' ) return TK_SHR ;
521
529
next (ls );
522
530
if (ls -> current == '=' ) { next (ls ); return TK_LSHRE ; }
0 commit comments