aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCohenArthur <arthur.cohen@epita.fr>2021-08-09 17:15:13 +0200
committerCohenArthur <arthur.cohen@epita.fr>2021-09-06 16:18:23 +0200
commitb6f69bf1369826e52919d4342cc5f89b1f10aa64 (patch)
treee9072b3d2fb0edeb074b1231ec0781a93bc56cab /gcc
parent50623899998de5a8ffe47227a351c2b3dd29aa0a (diff)
downloadgcc-b6f69bf1369826e52919d4342cc5f89b1f10aa64.zip
gcc-b6f69bf1369826e52919d4342cc5f89b1f10aa64.tar.gz
gcc-b6f69bf1369826e52919d4342cc5f89b1f10aa64.tar.bz2
parser: Expose get_errors() function
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/parse/rust-parse.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 86e0d2a..45f00f5 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;