- added handling for shift and bit operators.
- added the '>>>' (unsigned shift) operator. Although, with unsigned numbers available, this is technically not really needed, DECORATE supports this so ZScript should, too, if only for the benefit of making conversion tools easier to handle.
This commit is contained in:
parent
938ab4ca70
commit
23a2a19a78
5 changed files with 19 additions and 4 deletions
|
|
@ -114,7 +114,7 @@ static void SetNodeLine(ZCC_TreeNode *name, int line)
|
|||
%left OR. /* Note that this is like the Ruby precedence for these */
|
||||
%left XOR. /* three operators and not the C precedence, since */
|
||||
%left AND. /* they are higher priority than the comparisons. */
|
||||
%left LSH RSH.
|
||||
%left LSH RSH URSH.
|
||||
%left SUB ADD.
|
||||
%left MUL DIV MOD CROSSPROD DOTPROD.
|
||||
%left POW.
|
||||
|
|
@ -1148,6 +1148,11 @@ expr(X) ::= expr(A) RSH expr(B). /* a >> b */
|
|||
BINARY_EXPR(A,B,PEX_RightShift);
|
||||
X = expr2;
|
||||
}
|
||||
expr(X) ::= expr(A) URSH expr(B). /* a >>> b */
|
||||
{
|
||||
BINARY_EXPR(A,B,PEX_URightShift);
|
||||
X = expr2;
|
||||
}
|
||||
expr(X) ::= expr(A) DOTDOT expr(B). /* a .. b */
|
||||
{
|
||||
BINARY_EXPR(A,B,PEX_Concat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue