fn expand_file_macro(&mut self, ast: &mut ast::MacroCall) -> Result<BuiltInMacro, ParseError> {
        let id = self.storage.insert_str(self.source.name());
        let source = ast::StrSource::Synthetic(id);
        let node = ast::LitStr {
            token: ast::Token {
                kind: ast::Kind::Str(ast::StrSource::Synthetic(id)),
                span: ast.span(),
            },
            source,
        };
        Ok(BuiltInMacro::File(BuiltInFile {
            span: ast.span(),
            value: node,
        }))
    }
/// Expand a macro returning the current file
Expand a macro returning the current file
Expand a macro returning the current file
fn expand_file_macro(&mut self, ast: &mut ast::MacroCall) -> Result<BuiltInMacro, ParseError> {
        let id = self.storage.insert_str(self.source.name());
        let source = ast::StrSource::Synthetic(id);
        let node = ast::LitStr {
            token: ast::Token {
                kind: ast::Kind::Str(ast::StrSource::Synthetic(id)),
                span: ast.span(),
            },
            source,
        };
        Ok(BuiltInMacro::File(BuiltInFile {
            span: ast.span(),
            value: node,
        }))
    }
fn expand_file_macro ( & mut self , ast : & mut ast :: MacroCall ) -> Result < BuiltInMacro , ParseError > { let id = self . storage . insert_str ( self . source . name ( ) ) ; let source = ast :: StrSource :: Synthetic ( id ) ; let node = ast :: LitStr { token : ast :: Token { kind : ast :: Kind :: Str ( ast :: StrSource :: Synthetic ( id ) ) , span : ast . span ( ) , } , source , } ; Ok ( BuiltInMacro :: File ( BuiltInFile { span : ast . span ( ) , value : node , } ) ) }
Expand a macro returning the current file
Expand a macro returning the current file
&mut self
ast
&mut ast::MacroCall
&mut self
ast
&mut ast::MacroCall