We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de8eb4d commit f9990c7Copy full SHA for f9990c7
compiler/src/dotty/tools/dotc/parsing/package.scala
@@ -7,6 +7,13 @@ import core.NameOps._
7
8
package object parsing {
9
10
+ /**
11
+ * Compute the precedence of infix operator `operator` according to the SLS [§ 6.12.3][SLS].
12
+ * We implement [SIP-33][SIP-33] and give type operators the same precedence as term operators.
13
+ *
14
+ * [SLS]: https://www.scala-lang.org/files/archive/spec/2.13/06-expressions.html#infix-operations
15
+ * [SIP-33]: https://docs.scala-lang.org/sips/priority-based-infix-type-precedence.html
16
+ */
17
def precedence(operator: Name): Int =
18
if (operator eq nme.ERROR) -1
19
else {
0 commit comments