Commit Graph

7 Commits

Author SHA1 Message Date
Robert Widmann
420cf6c18d Improve "reference-to" message somewhat 2019-10-18 11:35:12 -07:00
Robert Widmann
6bb0e49eab Move precedence group cycle checking into requests
Use the request evaluator to get the easier in-module precedence group cycles.   Unfortunately, cross-module precedence group cycles are still a possibility, and do not actually cause cyclic request evaluation, so we cannot completely erase the old diagnostics machinery.

Move the machinery itself into the type checker and shift the request into that zone as well to appease the linker.
2019-10-18 11:19:25 -07:00
Robert Widmann
d992ff367b Requestify Operator Validation
Restructure the way operators and precedencegroup declarations are validated.  First, factor out the common operator validation code into the DeclChecker.  Then, redo the lookup and validation code for precedence groups to work with the request model.  Finally, delete the validateDecl overloads on the TypeChecker.

Unfortunately, the evaluator is not capable of detecting all the cycles TypeCheckDecl can.  In particular, certain cross-file precedence group cycles cannot be diagnosed via  request alone.  That infrastructure all stays in place.
2019-09-25 09:55:05 -07:00
Dmitri Gribenko
984210aa53 tests: replace '// RUN: rm -rf' '// RUN: mkdir' pairs with '%empty-directory(...)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
John McCall
c8c41b385c 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.
2016-07-26 14:04:57 -07:00