Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions hscript/Parser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ class Parser {
["..."],
["&&"],
["||"],
["??"],
["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","&=","^=","=>","??" + "="],
["->", "??"],
["->"],
["is"]
];
opPriority = new Map();
Expand All @@ -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!
Expand Down