Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
f3559c6cb4
No known key found for this signature in database GPG Key ID: E67890ADC4227273
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. +2
    -2
      grammar.js

+ 2
- 2
grammar.js Näytä tiedosto

@ -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,

Ladataan…
Peruuta
Tallenna