Browse Source

fix: swap precedences of assignnment and conditional expressions

`a *= b != c ? d : e;` is parsed incorrectly as a result
pull/156/head
Amaan Qureshi 3 years ago
parent
commit
f3559c6cb4
No known key found for this signature in database GPG Key ID: E67890ADC4227273
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      grammar.js

+ 2
- 2
grammar.js View File

@ -12,8 +12,8 @@
const PREC = {
PAREN_DECLARATOR: -10,
ASSIGNMENT: -1,
CONDITIONAL: -2,
ASSIGNMENT: -2,
CONDITIONAL: -1,
DEFAULT: 0,
LOGICAL_OR: 1,
LOGICAL_AND: 2,

Loading…
Cancel
Save