atom-language-rust icon indicating copy to clipboard operation
atom-language-rust copied to clipboard

highlight formatting syntax in the macro families `format`, `write`, `print`, …

Open flying-sheep opened this issue 10 years ago • 4 comments

syntax and macros are explained here.

format!      // described above
write!       // first argument is a &mut io::Write, the destination
writeln!     // same as write but appends a newline
print!       // the format string is printed to the standard output
println!     // same as print but appends a newline
format_args! // described below.

we could match all macro calls starting with format…, write…, and print…, so people can define their own, and maybe also the stuff from the log crate, i.e. log!, error!, warn!, debug!, info!, trace!

flying-sheep avatar Nov 23 '15 10:11 flying-sheep

Macros should already be matched. There are rules for matching built-in, core, std and log macros as well as generic macro invocation (rust.cson#L268)

zargony avatar Nov 30 '15 09:11 zargony

please reopen after you read what this is about.

you didn’t read the title.

flying-sheep avatar Nov 30 '15 11:11 flying-sheep

Oops sorry, I didn't realize that you were talking about the format string, not about the macro invocation.

zargony avatar Nov 30 '15 11:11 zargony

yeah :smile:

thanks!

flying-sheep avatar Nov 30 '15 11:11 flying-sheep