Update toolchain keyword list to match design. (#2961)

- `xor` keyword is removed, with `^` used in its place.
- For consistency, also replaced unary `~` with unary `^`, as those
changes come from the same proposal.
- `type` keyword is added.
- To keep existing tests working, parsing support for `type` literal is
added too.
- `is` keyword is removed; we'd already added the `impls` keyword to the
list.
- Several other missing keywords added.
This commit is contained in:
Richard Smith
2023-06-29 04:11:00 +00:00
committed by GitHub
parent cb14ce56a8
commit cb16a1ffca
10 changed files with 160 additions and 21 deletions
@@ -70,7 +70,8 @@ auto ParserHandleExpressionInPostfix(ParserContext& context) -> void {
case TokenKind::IntegerTypeLiteral:
case TokenKind::UnsignedIntegerTypeLiteral:
case TokenKind::FloatingPointTypeLiteral:
case TokenKind::StringTypeLiteral: {
case TokenKind::StringTypeLiteral:
case TokenKind::Type: {
context.AddLeafNode(ParseNodeKind::Literal, context.Consume());
context.PushState(state);
break;