1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

Update generating tools to produce stylish code.

Really small whitespace changes in generated code.
This commit is contained in:
Calvin Rose 2019-02-19 21:28:22 -05:00
parent c022a1cf1a
commit cb002e7b84
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@
(def str (string ;(interpose ", " (map (partial string/format "0x%.2X") line)))) (def str (string ;(interpose ", " (map (partial string/format "0x%.2X") line))))
(file/write image-file " " str ",\n")) (file/write image-file " " str ",\n"))
(file/write image-file (file/write image-file
"0};\n\n" " 0\n};\n\n"
"const unsigned char *janet_core_image = janet_core_image_bytes;\n" "const unsigned char *janet_core_image = janet_core_image_bytes;\n"
"size_t janet_core_image_size = sizeof(janet_core_image_bytes);\n") "size_t janet_core_image_size = sizeof(janet_core_image_bytes);\n")
(file/close image-file)) (file/close image-file))

View File

@ -73,7 +73,7 @@ int main(int argc, const char **argv) {
if (lineIndex++ == 0) { if (lineIndex++ == 0) {
if (line++) if (line++)
fputc(',', out); fputc(',', out);
fputs("\n\t", out); fputs("\n ", out);
} else { } else {
fputs(", ", out); fputs(", ", out);
} }