size-of: Use bake syntax
parent
568f91daca
commit
31d0e3c77b
|
@ -12,15 +12,15 @@ IN: size-of
|
|||
VAR: headers
|
||||
|
||||
: include-headers ( -- seq )
|
||||
headers> [ { "#include <" , ">" } bake to-string ] map ;
|
||||
headers> [ `{ "#include <" , ">" } to-string ] map ;
|
||||
|
||||
: size-of-c-program ( type -- lines )
|
||||
{
|
||||
`{
|
||||
"#include <stdio.h>"
|
||||
include-headers
|
||||
{ "main() { printf( \"%i\" , sizeof( " , " ) ) ; }" }
|
||||
}
|
||||
bake to-strings ;
|
||||
to-strings ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
|
Loading…
Reference in New Issue