josh11b and Jon Ross-Perkins
6067ca3f49
Change return of SkipPastLikelyEnd to be last consumed token ( #3493 )
...
This approach means the parse subtree includes the full token range
consumed.
---------
Co-authored-by: Jon Ross-Perkins <jperkins@google.com >
2023-12-11 22:11:09 +00:00
josh11b
b7d129b88c
Add PushState overload to combine Parse::State change with StateStackEntry ( #3485 )
...
Shortens a common `PushState` pattern
2023-12-08 23:58:30 +00:00
Geoff Romer and Richard Smith
39750b9925
Parse support for tuple patterns in var and let ( #3448 )
...
Co-authored-by: Richard Smith <richard@metafoo.co.uk >
2023-12-08 01:16:03 +00:00
josh11b and Jon Ross-Perkins
fada410559
Support declaration modifier keywords ( #3412 )
...
Co-authored-by: Jon Ross-Perkins <jperkins@google.com >
2023-12-05 22:45:57 +00:00
Geoff Romer
b8d4e2f41b
Binding pattern naming cleanup ( #3410 )
...
- Rename `PatternBinding` to `BindingPattern`.
- Use `BindingPattern` rather than `Pattern` in the names of
binding-pattern-specific parse states.
2023-12-01 21:36:51 +00:00
josh11b
5020fdb3be
Use abbreviation "decl" instead of "declaration" ( #3382 )
...
Part of switching to the [abbreviations we've decided to
use](https://docs.google.com/document/d/1RRYMm42osyqhI2LyjrjockYCutQ5dOf8Abu50kTrkX0/edit?resourcekey=0-kHyqOESbOHmzZphUbtLrTw#heading=h.pph7i5m5un7q ).
I will rename files in a follow-up PR.
2023-11-10 10:43:25 +00:00
josh11b
11ca083855
Use abbreviation "expr" instead of "expression" ( #3375 )
...
Part of switching to the [abbreviations we've decided to
use](https://docs.google.com/document/d/1RRYMm42osyqhI2LyjrjockYCutQ5dOf8Abu50kTrkX0/edit?resourcekey=0-kHyqOESbOHmzZphUbtLrTw#heading=h.pph7i5m5un7q ).
I will rename files in a follow-up PR.
2023-11-10 01:32:32 +00:00
Richard Smith
74d52738ff
Support for let declarations. ( #3257 )
...
A `let` declaration is represented by a `bind_name` node in SemIR:
```carbon-semir
%b: i32 = bind_name "b", %a
```
Because `Check` encounters the pattern before it sees the value, we
first create the `bind_name` node with an unset value and don't add it
to the block. Then, once we've seen and converted the initializer, we
update the `bind_name` to have the value and add it to the current
block, after the initializer code.
2023-10-06 00:06:21 +00:00