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.h35
1 files changed, 15 insertions, 20 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 1d49c95..21540a3 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -139,7 +139,7 @@ public:
std::unique_ptr<AST::BlockExpr>
parse_block_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::Item> parse_item (bool called_from_statement);
std::unique_ptr<AST::Pattern> parse_pattern ();
@@ -211,10 +211,9 @@ private:
// first token parsed in the expression (the parsing of that first
// token should be skipped).
parse_qualified_path_in_expression (Location pratt_parsed_loc
- = Linemap::unknown_location ());
- AST::QualifiedPathType
- parse_qualified_path_type (Location pratt_parsed_loc
- = Linemap::unknown_location ());
+ = UNKNOWN_LOCATION);
+ AST::QualifiedPathType parse_qualified_path_type (Location pratt_parsed_loc
+ = UNKNOWN_LOCATION);
AST::QualifiedPathInType parse_qualified_path_in_type ();
// Token tree or macro related
@@ -566,19 +565,18 @@ private:
// token should be skipped).
std::unique_ptr<AST::IfExpr>
parse_if_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::IfLetExpr>
parse_if_let_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::LoopExpr>
parse_loop_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
AST::LoopLabel label = AST::LoopLabel::error (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::WhileLoopExpr>
parse_while_loop_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
AST::LoopLabel label = AST::LoopLabel::error (),
- Location pratt_parsed_loc
- = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::WhileLetLoopExpr>
parse_while_let_loop_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
AST::LoopLabel label = AST::LoopLabel::error ());
@@ -587,7 +585,7 @@ private:
AST::LoopLabel label = AST::LoopLabel::error ());
std::unique_ptr<AST::MatchExpr>
parse_match_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
AST::MatchArm parse_match_arm ();
std::vector<std::unique_ptr<AST::Pattern> >
parse_match_arm_patterns (TokenId end_token_id);
@@ -608,25 +606,22 @@ private:
// token should be skipped).
std::unique_ptr<AST::ReturnExpr>
parse_return_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::BreakExpr>
parse_break_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::ContinueExpr>
parse_continue_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc
- = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::UnsafeBlockExpr>
parse_unsafe_block_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc
- = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::ArrayExpr>
parse_array_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::ExprWithoutBlock>
parse_grouped_or_tuple_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
- Location pratt_parsed_loc
- = Linemap::unknown_location ());
+ Location pratt_parsed_loc = UNKNOWN_LOCATION);
std::unique_ptr<AST::StructExprField> parse_struct_expr_field ();
bool will_be_expr_with_block ();