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:
John McCall
2016-07-26 00:26:15 -07:00
parent 0a8c6ba190
commit c8c41b385c
101 changed files with 2082 additions and 995 deletions

View File

@@ -492,6 +492,11 @@ OperatorDecl *SerializedASTFile::lookupOperator(Identifier name,
return File.lookupOperator(name, fixity);
}
PrecedenceGroupDecl *
SerializedASTFile::lookupPrecedenceGroup(Identifier name) const {
return File.lookupPrecedenceGroup(name);
}
void SerializedASTFile::lookupVisibleDecls(Module::AccessPathTy accessPath,
VisibleDeclConsumer &consumer,
NLKind lookupKind) const {