public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1027 #1032
@ 2022-06-08 12:20 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:20 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e48bce446cc7ee4f1fb6980209720582def6e4e0
commit e48bce446cc7ee4f1fb6980209720582def6e4e0
Merge: 3ada3d8365b 313e9890d85 1e873922f0d
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Thu Mar 17 11:25:48 2022 +0000
Merge #1027 #1032
1027: parser: Allow parsing stmts without closing semicolon r=CohenArthur a=CohenArthur
In certain cases such as macro matching or macro expansion, it is
important to allow the parser to return a valid statement even if no
closing semicolon is given. This commit adds an optional parameter to
the concerned functions to allow a lack of semicolon those special cases
Closes #1011
Closes #1010
1032: Add AST kind information r=CohenArthur a=CohenArthur
Closes #1001
This PR adds a base for adding node information to our AST types. It can be used when requiring to differentiate between multiple kinds of nodes, while not necessarily wanting to do a full static cast. This will open up a lot of cleanup issues and good first issues for Project Pineapple
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diff:
gcc/rust/ast/rust-ast.h | 28 +++++++++++++++++--
gcc/rust/ast/rust-macro.h | 4 +++
gcc/rust/expand/rust-macro-expand.cc | 7 +++--
gcc/rust/hir/rust-ast-lower-expr.h | 8 ------
gcc/rust/hir/rust-ast-lower-implitem.h | 16 -----------
gcc/rust/hir/rust-ast-lower-item.h | 8 ------
gcc/rust/hir/rust-ast-lower-stmt.h | 8 ------
gcc/rust/hir/rust-ast-lower.cc | 10 +++++++
gcc/rust/parse/rust-parse-impl.h | 44 ++++++++++++++++++++---------
gcc/rust/parse/rust-parse.h | 51 +++++++++++++++++++++++++++++++---
gcc/testsuite/rust/compile/macro16.rs | 11 ++++++++
gcc/testsuite/rust/compile/macro18.rs | 14 ++++++++++
gcc/testsuite/rust/compile/macro19.rs | 19 +++++++++++++
gcc/testsuite/rust/compile/macro9.rs | 1 +
14 files changed, 167 insertions(+), 62 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:20 [gcc/devel/rust/master] Merge #1027 #1032 Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).