Add parsing for builtin # in expression and item context
This commit is contained in:
parent
4b94c23219
commit
59ecbd2cea
8 changed files with 96 additions and 1 deletions
|
@ -265,6 +265,9 @@ impl<'a> Parser<'a> {
|
|||
// UNION ITEM
|
||||
self.bump(); // `union`
|
||||
self.parse_item_union()?
|
||||
} else if self.is_builtin() {
|
||||
// BUILTIN# ITEM
|
||||
return self.parse_item_builtin();
|
||||
} else if self.eat_keyword(kw::Macro) {
|
||||
// MACROS 2.0 ITEM
|
||||
self.parse_item_decl_macro(lo)?
|
||||
|
@ -434,6 +437,11 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn parse_item_builtin(&mut self) -> PResult<'a, Option<ItemInfo>> {
|
||||
// To be expanded
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
/// Parses an item macro, e.g., `item!();`.
|
||||
fn parse_item_macro(&mut self, vis: &Visibility) -> PResult<'a, MacCall> {
|
||||
let path = self.parse_path(PathStyle::Mod)?; // `foo::bar`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue