Struct rustfmt_nightly::macros::MacroArgParser [−][src]
struct MacroArgParser {
buf: String,
lo: BytePos,
start_tok: Token,
is_meta_var: bool,
hi: BytePos,
last_tok: Token,
result: Vec<ParsedMacroArg>,
}Expand description
Parses macro arguments on macro def.
Fields
buf: StringEither a name of the next metavariable, a separator, or junk.
lo: BytePosThe start position on the current buffer.
start_tok: TokenThe first token of the current buffer.
is_meta_var: booltrue if we are parsing a metavariable or a repeat.
hi: BytePosThe position of the last token.
last_tok: TokenThe last token parsed.
result: Vec<ParsedMacroArg>Holds the parsed arguments.
Implementations
fn add_repeat(
&mut self,
inner: Vec<ParsedMacroArg>,
delim: DelimToken,
iter: &mut Cursor,
span: Span
) -> Option<()>
Returns a collection of parsed macro def’s arguments.
Auto Trait Implementations
impl !RefUnwindSafe for MacroArgParser
impl !Send for MacroArgParser
impl !Sync for MacroArgParser
impl Unpin for MacroArgParser
impl !UnwindSafe for MacroArgParser
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 112 bytes