aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-09-09 13:22:33 +0000
committerGitHub <noreply@github.com>2021-09-09 13:22:33 +0000
commit38f2795947ab8d8080bab81c5e2ccdd24981cbcc (patch)
treeccb4cab2678bc6e7ac50b4549e48481bc35da9ae /gcc/rust/parse/rust-parse.h
parent4c4241b4c8da925b7f39e0045d3d36fbf71551f8 (diff)
parent8cd6306905b31a0fb92f95e8472c6a8e26a17b04 (diff)
downloadgcc-38f2795947ab8d8080bab81c5e2ccdd24981cbcc.zip
gcc-38f2795947ab8d8080bab81c5e2ccdd24981cbcc.tar.gz
gcc-38f2795947ab8d8080bab81c5e2ccdd24981cbcc.tar.bz2
Merge #639
639: External module expansion r=philberty a=CohenArthur Needs #638 This PR parses the file associated with an external module and allows their compilation. The two test cases are not currently passing, and the locations will be inexact (the filename for the parsed module will just show as random characters), so the PR is still a draft. Co-authored-by: CohenArthur <arthur.cohen@epita.fr>
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-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;