boot2

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

014-str-paste.M1pp (498B)


      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), which
      4 #    is then emitted as raw bytes — so `:str_quote %str(quote)`
      5 #    produces `:str_quote 71 75 6F 74 65`.
      6 #  - Complementary operators: paste builds the label, %str builds the
      7 #    decoded byte sequence.
      8 
      9 %macro defsym(n)
     10 :str_ ## n %str(n)
     11 %endm
     12 
     13 %defsym(quote)
     14 %defsym(if)
     15 %defsym(begin)
     16 END