Skip to content

Commit e463d3d

Browse files
Document macros
1 parent acda59a commit e463d3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rust-engine/src/backends/lean.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,20 @@ const _: () = {
234234
#[allow(unused)]
235235
macro_rules! todo {($($tt:tt)*) => {disambiguated_todo!($($tt)*)};}
236236

237+
// Insert a new line in a doc (pretty)
237238
macro_rules! line {($($tt:tt)*) => {disambiguated_line!($($tt)*)};}
238239

240+
// Concatenate docs (pretty )
239241
macro_rules! concat {($($tt:tt)*) => {disambiguated_concat!($($tt)*)};}
240242

243+
// Given an iterable `[A,B, ... , C]` and a separator `S`, create the doc `ASBS...CS`
241244
macro_rules! zip_right {
242245
($a:expr, $sep:expr) => {
243246
docs![concat!($a.into_iter().map(|a| docs![a, $sep]))]
244247
};
245248
}
246249

250+
// Given an iterable `[A,B, ... , C]` and a separator `S`, create the doc `SASB...SC`
247251
macro_rules! zip_left {
248252
($sep:expr, $a:expr) => {
249253
docs![concat!($a.into_iter().map(|a| docs![$sep, a]))]

0 commit comments

Comments
 (0)