move syntax::ext to new crate syntax_expand

This commit is contained in:
Mazdak Farrokhzad
2019-10-16 10:59:30 +02:00
parent d160a4e422
commit d420d719c4
113 changed files with 500 additions and 430 deletions

View File

@@ -13,7 +13,7 @@ use errors::{Applicability, pluralise};
/// Specifies how to parse a path.
#[derive(Copy, Clone, PartialEq)]
crate enum PathStyle {
pub enum PathStyle {
/// In some contexts, notably in expressions, paths with generic arguments are ambiguous
/// with something else. For example, in expressions `segment < ....` can be interpreted
/// as a comparison and `segment ( ....` can be interpreted as a function call.
@@ -88,7 +88,7 @@ impl<'a> Parser<'a> {
/// `a::b::C::<D>` (with disambiguator)
/// `Fn(Args)` (without disambiguator)
/// `Fn::(Args)` (with disambiguator)
crate fn parse_path(&mut self, style: PathStyle) -> PResult<'a, Path> {
pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, Path> {
maybe_whole!(self, NtPath, |path| {
if style == PathStyle::Mod &&
path.segments.iter().any(|segment| segment.args.is_some()) {