There is no fixed rule and XOR has different position in programming languages, but it has surely not higher precedence than AND and not lower than OR
这个提交包含在:
父节点
5ad57f6740
当前提交
0ad681ccf6
4
parse.c
4
parse.c
@ -219,9 +219,9 @@ static const ph7_expr_op aOpTable[] = {
|
||||
/* Precedence 15,left-associative */
|
||||
{ {"&&",sizeof(char)*2}, EXPR_OP_LAND,15, EXPR_OP_ASSOC_LEFT, PH7_OP_LAND},
|
||||
/* Precedence 16,left-associative */
|
||||
{ {"||",sizeof(char)*2}, EXPR_OP_LOR, 16, EXPR_OP_ASSOC_LEFT, PH7_OP_LOR},
|
||||
{ {"^^",sizeof(char)*2}, EXPR_OP_LXOR, 16, EXPR_OP_ASSOC_LEFT, PH7_OP_LXOR},
|
||||
/* Precedence 17,left-associative */
|
||||
{ {"^^",sizeof(char)*2}, EXPR_OP_LXOR, 17, EXPR_OP_ASSOC_LEFT, PH7_OP_LXOR},
|
||||
{ {"||",sizeof(char)*2}, EXPR_OP_LOR, 17, EXPR_OP_ASSOC_LEFT, PH7_OP_LOR},
|
||||
/* Ternary operator */
|
||||
/* Precedence 18,left-associative */
|
||||
{ {"?",sizeof(char)}, EXPR_OP_QUESTY, 18, EXPR_OP_ASSOC_LEFT, 0},
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户