public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] parser: Expose get_errors() function
@ 2022-06-08 11:31 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b6f69bf1369826e52919d4342cc5f89b1f10aa64

commit b6f69bf1369826e52919d4342cc5f89b1f10aa64
Author: CohenArthur <arthur.cohen@epita.fr>
Date:   Mon Aug 9 17:15:13 2021 +0200

    parser: Expose get_errors() function

Diff:
---
 gcc/rust/parse/rust-parse.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 86e0d2a6f83..45f00f57053 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -595,7 +595,6 @@ private:
   bool done_end_of_file ();
 
   void add_error (Error error) { error_table.push_back (std::move (error)); }
-  std::vector<Error> &get_errors () { return error_table; }
 
 public:
   // Construct parser with specified "managed" token source.
@@ -615,6 +614,9 @@ public:
   // Returns whether any parsing errors have occurred.
   bool has_errors () const { return !error_table.empty (); }
 
+  // Get a reference to the list of errors encountered
+  std::vector<Error> &get_errors () { return error_table; }
+
 private:
   // The token source (usually lexer) associated with the parser.
   ManagedTokenSource lexer;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 11:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:31 [gcc/devel/rust/master] parser: Expose get_errors() function 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).