fn expand_line_macro(&mut self, ast: &mut ast::MacroCall) -> Result<BuiltInMacro, ParseError> {
        let (l, _) = self
            .source
            .position_to_utf16cu_line_char(ast.open.span.start.into_usize())
            .unwrap_or((0, 0));

        let id = self.storage.insert_number(l + 1); // 1-indexed as that is what most editors will use
        let source = ast::NumberSource::Synthetic(id);

        Ok(BuiltInMacro::Line(BuiltInLine {
            span: ast.span(),

            value: ast::LitNumber {
                token: ast::Token {
                    kind: ast::Kind::Number(source),
                    span: ast.span(),
                },
                source,
            },
        }))
    }
/// Expand a macro returning the current line for where the macro invocation begins
Expand a macro returning the current line for where the macro invocation begins
Expand a macro returning the current line for where the macro invocation begins
fn expand_line_macro(&mut self, ast: &mut ast::MacroCall) -> Result<BuiltInMacro, ParseError> {
        let (l, _) = self
            .source
            .position_to_utf16cu_line_char(ast.open.span.start.into_usize())
            .unwrap_or((0, 0));
        let id = self.storage.insert_number(l + 1); // 1-indexed as that is what most editors will use
        let source = ast::NumberSource::Synthetic(id);
        Ok(BuiltInMacro::Line(BuiltInLine {
            span: ast.span(),
            value: ast::LitNumber {
                token: ast::Token {
                    kind: ast::Kind::Number(source),
                    span: ast.span(),
                },
                source,
            },
        }))
    }
fn expand_line_macro ( & mut self , ast : & mut ast :: MacroCall ) -> Result < BuiltInMacro , ParseError > { let ( l , _ ) = self . source . position_to_utf16cu_line_char ( ast . open . span . start . into_usize ( ) ) . unwrap_or ( ( 0 , 0 ) ) ; let id = self . storage . insert_number ( l + 1 ) ; // 1-indexed as that is what most editors will use let source = ast :: NumberSource :: Synthetic ( id ) ; Ok ( BuiltInMacro :: Line ( BuiltInLine { span : ast . span ( ) , value : ast :: LitNumber { token : ast :: Token { kind : ast :: Kind :: Number ( source ) , span : ast . span ( ) , } , source , } , } ) ) }
Expand a macro returning the current line for where the macro invocation begins
Expand a macro returning the current line for where the macro invocation begins
&mut self
ast
&mut ast::MacroCall
&mut self
ast
&mut ast::MacroCall