You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macrooh(name)
{%begin%}
raise%{Oh {{name.id}} }
{%end%}
end
oh no
The program builds and run as expected
$ crystal src/foo.cr
Oh no (Exception)
0x10e749892: *CallStack::unwind:Array(Pointer(Void)) at ??
0x10e749831: *CallStack#initialize:Array(Pointer(Void)) at ??
0x10e749808: *CallStack::new:CallStack at ??
0x10e743b01: *raise<Exception>:NoReturn at ??
0x10e743ae1: *raise<String>:NoReturn at ??
0x10e743638: __crystal_main at ??
0x10e748ac8: main at ??
But it fails to format
$ crystal tool format src/foo.cr
Error:, couldn't format 'src/foo.cr', please report a bug ...
bcardiff
changed the title
Formatter: fails when %{...} string are used inside macros.
Formatter: fails when %{...} strings are used inside macros
Apr 6, 2017
File:
foo.cr
The program builds and run as expected
But it fails to format
$ crystal --version
Crystal 0.21.1 (2017-03-07) LLVM 3.9.1
The text was updated successfully, but these errors were encountered: