Crates.io | rsyntax |
lib.rs | rsyntax |
version | 1.10.0 |
source | src |
created_at | 2016-04-25 16:12:29.271038 |
updated_at | 2016-04-25 16:12:29.271038 |
description | A custom Rust parser cloned from Rust libsyntax. It is only used for rfmt, another Rust source code formatter. |
homepage | https://github.com/zBaitu/rsyntax |
repository | https://github.com/zBaitu/rsyntax |
max_upload_size | |
id | 4857 |
size | 1,356,392 |
https://github.com/zBaitu/rsyntax
rSyntax is cloned from Rust libsyntax. It's only used for rFmt, another Rust source code formatter.
Only 3 file are changed.
/// Parse a `mod <foo> { ... }` or `mod <foo>;` item
fn parse_item_mod(&mut self, outer_attrs: &[Attribute]) -> PResult<'a, ItemInfo> {
let id_span = self.span;
let id = self.parse_ident()?;
if self.check(&token::Semi) {
self.bump();
// baitu
// This mod is in an external file. Let's go get it!
// let (m, attrs) = self.eval_src_mod(id, outer_attrs, id_span)?;
// Ok((id, m, Some(attrs)))
Ok((id, ItemKind::Mod(
Mod {
inner: mk_sp(id_span.lo, id_span.lo),
items: Vec::new(),
}),
None))