Parse support for where operator (#4275)

Includes support for the `impls`, `=`, and `==` requirement operators to
the right of a `where`, but `and` to allow multiple requirements is
still a TODO.

---------

Co-authored-by: Josh L <josh11b@users.noreply.github.com>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
josh11b
2024-09-11 03:17:07 +00:00
committed by GitHub
co-authored by Josh L Richard Smith
parent 8fa173b58a
commit c33c9a02f6
19 changed files with 784 additions and 38 deletions
+5
View File
@@ -621,6 +621,9 @@ class NodeStack {
case Parse::NodeKind::PrivateModifier:
case Parse::NodeKind::ProtectedModifier:
case Parse::NodeKind::RealLiteral:
case Parse::NodeKind::RequirementEqual:
case Parse::NodeKind::RequirementEqualEqual:
case Parse::NodeKind::RequirementImpls:
case Parse::NodeKind::ReturnStatement:
case Parse::NodeKind::SelfTypeName:
case Parse::NodeKind::SelfTypeNameExpr:
@@ -641,6 +644,8 @@ class NodeStack {
case Parse::NodeKind::UnsignedIntTypeLiteral:
case Parse::NodeKind::VariableDecl:
case Parse::NodeKind::VirtualModifier:
case Parse::NodeKind::WhereExpr:
case Parse::NodeKind::WhereOperand:
case Parse::NodeKind::WhileStatement:
return Id::Kind::Invalid;
}