mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement SE-0077: precedence group declarations.
What I've implemented here deviates from the current proposal text in the following ways: - I had to introduce a FunctionArrowPrecedence to capture the parsing of -> in expression contexts. - I found it convenient to continue to model the assignment property explicitly. - The comparison and casting operators have historically been non-associative; I have chosen to preserve that, since I don't think this proposal intended to change it. - This uses the precedence group names and higherThan/lowerThan as agreed in discussion.
This commit is contained in:
@@ -123,6 +123,9 @@ public:
|
||||
virtual OperatorDecl *lookupOperator(Identifier name,
|
||||
DeclKind fixity) const override;
|
||||
|
||||
virtual PrecedenceGroupDecl *
|
||||
lookupPrecedenceGroup(Identifier name) const override;
|
||||
|
||||
virtual void lookupVisibleDecls(Module::AccessPathTy accessPath,
|
||||
VisibleDeclConsumer &consumer,
|
||||
NLKind lookupKind) const override;
|
||||
|
||||
Reference in New Issue
Block a user