infix operator +++ : PikaPlusPrecedence infix operator *** : PikaStarPrecedence precedencegroup PikaPlusPrecedence { associativity: left higherThan: PikaStarPrecedence, AssignmentPrecedence } precedencegroup PikaStarPrecedence { associativity: left }
do { if (!Tok.is(tok::identifier)) { diagnose(Tok, diag::expected_precedencegroup_relation, attrName); return abortBody(); } auto name = Context.getIdentifier(Tok.getText()); auto loc = consumeToken(); relations.push_back({loc, name, nullptr}); } while (consumeIf(tok::comma));
ここの最後の行見てわかったwinfix operator <-= : AssignmentPrecedence func <-= <T> (_ lvalue: inout T, _ rvalue: T) -> T { lvalue = rvalue return lvalue } var x: Int = 1 let y = x <-= 3 print("x=\(x)") print("y=\(y)")
[omochi@omochi-iMac sw-op-def]$ swift a.swift x=3 y=3