Tholp's bespoke website generator
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add skip macro to mark blocks as preproccessed

Tholp a4a03d99 914b2748

+24 -2
+9 -2
src/macros/mod.rs
··· 57 57 }, 58 58 // Scoped 59 59 Macro { 60 - symbol: "comment", // Nothing 60 + symbol: "comment", // Removes its block 61 61 expansion: macro_comment, 62 62 takes_block: true, 63 63 min_args: 0, ··· 71 71 max_args: 1, 72 72 }, 73 73 Macro { 74 - symbol: "section", 74 + symbol: "section", // Define a (named) section 75 75 expansion: macro_section, 76 76 takes_block: true, 77 77 min_args: 0, ··· 105 105 min_args: 2, 106 106 max_args: 2, 107 107 }, 108 + Macro { // Marks the block to not be processed 109 + symbol: "skip", 110 + expansion: macro_skip, 111 + takes_block: true, 112 + min_args: 0, 113 + max_args: 0 114 + } 108 115 ];
+15
src/macros/simple_blocks.rs
··· 61 61 } 62 62 return tokens; 63 63 } 64 + 65 + pub fn macro_skip ( 66 + _origin_index: usize, 67 + _origin_line: usize, 68 + _context: &mut Project, 69 + _skid_context: &mut SkidContext, 70 + _args: &Vec<String>, 71 + scope: &[Token], 72 + ) -> Vec<Token> { 73 + let mut out = scope.to_vec(); 74 + for t in &mut out { 75 + t.pre_proccessed = true; 76 + } 77 + return out; 78 + }