diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-06-17 16:11:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-17 16:11:19 +0000 |
commit | c0f11672d760513256997f325da678016d13f677 (patch) | |
tree | ec8da7465f391924e34855f3f2ae812e6ad811e3 /gcc/rust/backend/rust-compile-struct-field-expr.h | |
parent | b711799e3eb450463a9f3be3b082b3ced9356358 (diff) | |
parent | 5f3c8286b225f3c87bed920f3c3e003a90d98722 (diff) | |
download | gcc-c0f11672d760513256997f325da678016d13f677.zip gcc-c0f11672d760513256997f325da678016d13f677.tar.gz gcc-c0f11672d760513256997f325da678016d13f677.tar.bz2 |
Merge #1317
1317: AST for const generic arguments/const application r=CohenArthur a=CohenArthur
This commit adds a new type to the AST which contains const generic
arguments. The `GenericArgs` structure now also keeps a vector of them,
and the parser was modified accordingly. We need to handle these extra
arguments in the various resolvers and type-checking phase.
As pointed out before, const generic arguments are ambiguous at the AST
level. Which is why this "sum type" contains a "Clear" variant when
there is no ambiguity at all (`<5>`, `<{ 5 }>`, `<{ 5 + 15 }>` or
`<{ N }>`) and an "Ambiguous" one if the value in question might be
referring to a type argument (`<N>`) instead of a const generic
argument.
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-struct-field-expr.h')
0 files changed, 0 insertions, 0 deletions