mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Merge pull request #383 from dbrotz/fix-380
Change the precedence of == to match the documentation
This commit is contained in:
@@ -537,8 +537,8 @@ static void strsubUTF8(char *dest, const char *src, uint32_t pos, uint32_t len)
|
||||
%token <tzString> T_STRING
|
||||
|
||||
%left <nConstValue> T_OP_LOGICNOT
|
||||
%left <nConstValue> T_OP_LOGICOR T_OP_LOGICAND T_OP_LOGICEQU
|
||||
%left <nConstValue> T_OP_LOGICGT T_OP_LOGICLT T_OP_LOGICGE T_OP_LOGICLE T_OP_LOGICNE
|
||||
%left <nConstValue> T_OP_LOGICOR T_OP_LOGICAND
|
||||
%left <nConstValue> T_OP_LOGICGT T_OP_LOGICLT T_OP_LOGICGE T_OP_LOGICLE T_OP_LOGICNE T_OP_LOGICEQU
|
||||
%left <nConstValue> T_OP_ADD T_OP_SUB
|
||||
%left <nConstValue> T_OP_OR T_OP_XOR T_OP_AND
|
||||
%left <nConstValue> T_OP_SHL T_OP_SHR
|
||||
|
||||
7
test/asm/operator-precedence.asm
Normal file
7
test/asm/operator-precedence.asm
Normal file
@@ -0,0 +1,7 @@
|
||||
print: MACRO
|
||||
printv \1
|
||||
printt "\n"
|
||||
ENDM
|
||||
|
||||
print 1 == 1 || 1 == 2
|
||||
print (1 == 1) || (1 == 2)
|
||||
2
test/asm/operator-precedence.out
Normal file
2
test/asm/operator-precedence.out
Normal file
@@ -0,0 +1,2 @@
|
||||
$1
|
||||
$1
|
||||
2
test/asm/operator-precedence.out.pipe
Normal file
2
test/asm/operator-precedence.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
||||
$1
|
||||
$1
|
||||
Reference in New Issue
Block a user