Fix use of shift operators in expressions regression since 3.0.0
This commit is contained in:
parent
aa4b14a3d2
commit
0be33b1900
2 changed files with 8 additions and 3 deletions
|
|
@ -45,3 +45,7 @@ public:
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
// Test shifts are still working
|
||||||
|
%inline %{
|
||||||
|
int shift_init1 = 4 << 2 >> 1;
|
||||||
|
%}
|
||||||
|
|
|
||||||
|
|
@ -877,15 +877,17 @@ static int look(Scanner *s) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 60: /* shift operators */
|
case 60: /* shift operators */
|
||||||
brackets_increment(s);
|
if ((c = nextchar(s)) == 0) {
|
||||||
if ((c = nextchar(s)) == 0)
|
brackets_increment(s);
|
||||||
return SWIG_TOKEN_LESSTHAN;
|
return SWIG_TOKEN_LESSTHAN;
|
||||||
|
}
|
||||||
if (c == '<')
|
if (c == '<')
|
||||||
state = 240;
|
state = 240;
|
||||||
else if (c == '=')
|
else if (c == '=')
|
||||||
return SWIG_TOKEN_LTEQUAL;
|
return SWIG_TOKEN_LTEQUAL;
|
||||||
else {
|
else {
|
||||||
retract(s, 1);
|
retract(s, 1);
|
||||||
|
brackets_increment(s);
|
||||||
return SWIG_TOKEN_LESSTHAN;
|
return SWIG_TOKEN_LESSTHAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -1340,7 +1342,6 @@ static int look(Scanner *s) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 240: /* LSHIFT, LSEQUAL */
|
case 240: /* LSHIFT, LSEQUAL */
|
||||||
brackets_increment(s);
|
|
||||||
if ((c = nextchar(s)) == 0)
|
if ((c = nextchar(s)) == 0)
|
||||||
return SWIG_TOKEN_LSHIFT;
|
return SWIG_TOKEN_LSHIFT;
|
||||||
else if (c == '=')
|
else if (c == '=')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue