boot2

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

14-str-paste.M1pp (364B)


      1 # `##` paste + `%str` stringify composed on the same identifier.
      2 #  - `##` joins word fragments: str_##n -> str_quote (TOK_WORD).
      3 #  - `%str(n)` wraps the same identifier in quotes (TOK_STRING).
      4 #  - Complementary operators: paste builds the label, %str builds the literal.
      5 
      6 %macro defsym(n)
      7 :str_ ## n %str(n)
      8 %endm
      9 
     10 %defsym(quote)
     11 %defsym(if)
     12 %defsym(begin)
     13 END