Add Span to ast::WhereClause
This commit is contained in:
parent
4a42ff4823
commit
6375b77ebb
6 changed files with 13 additions and 2 deletions
|
@ -4373,6 +4373,7 @@ impl<'a> Parser<'a> {
|
|||
where_clause: WhereClause {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
predicates: Vec::new(),
|
||||
span: syntax_pos::DUMMY_SP,
|
||||
},
|
||||
span: span_lo.to(self.prev_span),
|
||||
})
|
||||
|
@ -4440,11 +4441,13 @@ impl<'a> Parser<'a> {
|
|||
let mut where_clause = WhereClause {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
predicates: Vec::new(),
|
||||
span: syntax_pos::DUMMY_SP,
|
||||
};
|
||||
|
||||
if !self.eat_keyword(keywords::Where) {
|
||||
return Ok(where_clause);
|
||||
}
|
||||
let lo = self.prev_span;
|
||||
|
||||
// This is a temporary future proofing.
|
||||
//
|
||||
|
@ -4522,6 +4525,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
where_clause.span = lo.to(self.prev_span);
|
||||
Ok(where_clause)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue