Skip to content

Commit

Permalink
Fix first doc comment inside macro yield
Browse files Browse the repository at this point in the history
  • Loading branch information
RX14 committed Sep 30, 2024
1 parent 46ca8fb commit 9324e91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/crystal/macros/interpreter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module Crystal
if (loc = @last.location) && loc.filename.is_a?(String) || is_yield
macro_expansion_pragmas = @macro_expansion_pragmas ||= {} of Int32 => Array(Lexer::LocPragma)
(macro_expansion_pragmas[@str.pos.to_i32] ||= [] of Lexer::LocPragma) << Lexer::LocPushPragma.new
@str << "begin " if is_yield
@str << "begin\n" if is_yield
@last.to_s(@str, macro_expansion_pragmas: macro_expansion_pragmas, emit_doc: true)
@str << " end" if is_yield
(macro_expansion_pragmas[@str.pos.to_i32] ||= [] of Lexer::LocPragma) << Lexer::LocPopPragma.new
Expand Down

0 comments on commit 9324e91

Please sign in to comment.