: \ 10 parse 2drop ; immediate \ test : ( [ char ) ] literal parse 2drop ; immediate ( test ) : binary 2 base ! ; : octal 8 base ! ; : decimal 10 base ! ; : hex 16 base ! ; : mark here 0 d, ; : >resolve dup here swap - 4 - swap d! ; : begin mark ; immediate : else branch >mark swap >resolve ; immediate : then >resolve ; immediate : while ?branch >mark ; immediate : repeat branch swap resolve ; immediate : ?dup dup 0<> if dup then ; : allot here swap dp +! ; : ?find ?dup if find 0= if 2drop abort then else abort then ; : 'h parse-name ?find ; : ' 'h >body ; : [compile] ' ( word ) compile, ; immediate : ['] ' ( word ) [compile] literal ; immediate : postpone 'h ( word ) dup immediate? if >body compile, else >body [compile] literal ['] compile, compile, then ; immediate : create parse-name (header) latest ! ['] (create) compile, 0 , ; : does> latest @ >body 2 + ['] (does>) over ! \ replace call loc ( replace destination ) 11 + r> swap ! ; ( the lone r> means we don't execute the rest of the word now, ) ( but it is actually compiled into the definition and is jumped to ) ( by a create does> made word ) : constant create , does> @ ; bye