Swift works the way this article describes, except that instead of the rules being built in to the compiler, they are defined by the standard library, and you can define your own precedence levels and associativity for custom operators.
https://github.com/apple/swift/blob/3ea9e9e55281b9957d2b5486...