Skip to content

Commit dc16d1e

Browse files
committed
add a fallback precedence
1 parent 23f0fed commit dc16d1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/operators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ comp_prec(op::String) = get(AllPrecs, op, 0) === ComparisonOp || (length(op) > 1
488488
# Which ops have different precend when dotted?
489489
# [op for op in Symbol.(keys(CSTParser.AllPrecs)) if Base.isoperator(op) && Base.isoperator(Symbol(".", op)) && Base.operator_precedence(op) !== Base.operator_precedence(Symbol(".", op))]
490490

491-
get_prec(op) = AllPrecs[maybe_strip_suffix(op)]
491+
get_prec(op) = get(AllPrecs, maybe_strip_suffix(op), 0)
492492

493493
function maybe_strip_suffix(op::String)
494494
for (i, c) in enumerate(op)

0 commit comments

Comments
 (0)