From 32ded4eabb2dca59b29a9166dbb40dceeb1d5e0e Mon Sep 17 00:00:00 2001 From: Villezen Date: Wed, 18 Nov 2026 02:52:35 +0200 Subject: [PATCH] fix ?? fallback being ignored in assignments --- hscript/Parser.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hscript/Parser.hx b/hscript/Parser.hx index 21318bb1..95571fe0 100644 --- a/hscript/Parser.hx +++ b/hscript/Parser.hx @@ -137,8 +137,9 @@ class Parser { ["..."], ["&&"], ["||"], + ["??"], ["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","&=","^=","=>","??" + "="], - ["->", "??"], + ["->"], ["is"] ]; opPriority = new Map(); @@ -147,13 +148,13 @@ class Parser { for(i => p in priorities) for(x in p) { opPriority.set(x, i); - if( i == 9 ) opRightAssoc.set(x, true); + if( i == 10 ) opRightAssoc.set(x, true); } #else for( i in 0...priorities.length ) for( x in priorities[i] ) { opPriority.set(x, i); - if( i == 9 ) opRightAssoc.set(x, true); + if( i == 10 ) opRightAssoc.set(x, true); } #end for( x in ["!", "++", "--", "~"] ) // unary "-" handled in parser directly!