boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

02-defs.M1pp (460B)


      1 ## %macro definitions are stored, not invoked.
      2 ## Defs produce no output; non-def tokens pass through unchanged.
      3 ## Exercises: 0/1/many params, multi-token bodies, string body tokens,
      4 ## body-internal ## paste, %macro-looking words mid-line, empty body.
      5 before
      6 %macro A()
      7     body one
      8     body two
      9 %endm
     10 middle
     11 %macro B(x)
     12     x before ## x after
     13     "string in body"
     14 %endm
     15 not %macro at line start
     16 %macro C(p, q, r)
     17     p q r
     18 %endm
     19 %macro EMPTY(x)
     20 %endm
     21 last