aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-rw-r--r--gcc/rust/parse/rust-parse.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 1c7bd78..3920893 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -141,7 +141,6 @@ private:
std::unique_ptr<AST::MacroMatchRepetition> parse_macro_match_repetition ();
// Top-level item-related
- std::vector<std::unique_ptr<AST::Item> > parse_items ();
std::unique_ptr<AST::Item> parse_item (bool called_from_statement);
std::unique_ptr<AST::VisItem> parse_vis_item (AST::AttrVec outer_attrs);
std::unique_ptr<AST::MacroItem> parse_macro_item (AST::AttrVec outer_attrs);
@@ -580,11 +579,16 @@ 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.
Parser (ManagedTokenSource tokenSource) : lexer (std::move (tokenSource)) {}
+ // Parse items without parsing an entire crate. This function is the main
+ // parsing loop of AST::Crate::parse_crate().
+ std::vector<std::unique_ptr<AST::Item> > parse_items ();
+
// Main entry point for parser.
AST::Crate parse_crate ();