Commit f761fcb
committed
Parser: constexpr/constinit structured bindings, co_await/co_yield as expressions
- isStructuredBindingStart: now recognizes constexpr/constinit before auto
e.g. 'constexpr auto [a, b] = p;' -- C++17/20 constexpr structured binding
- parseStructuredBinding: consume constexpr/constinit before auto
- parsePrimary: co_await and co_yield now handled as unary prefix expressions
so 'int x = co_await awaitable;' parses correctly (previously only worked
as standalone statements)1 parent df5e924 commit f761fcb
2 files changed
Lines changed: 7 additions & 0 deletions
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3162 | 3162 | | |
3163 | 3163 | | |
3164 | 3164 | | |
| 3165 | + | |
3165 | 3166 | | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
3166 | 3170 | | |
3167 | 3171 | | |
3168 | 3172 | | |
| |||
3172 | 3176 | | |
3173 | 3177 | | |
3174 | 3178 | | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
3175 | 3182 | | |
3176 | 3183 | | |
3177 | 3184 | | |
| |||
0 commit comments