does exactly what the name says.
since both nu -c ast and nu --ide-ast do not retain all important information
this is for now regex-based and therefore limited.
useandexport usehave to be the first command in a line or stand directly after a;.- if either condition is met within a (multiline-) string it will get screwed up.
$NU_LIB_DIRSare not supported. use relative imports instead.sourceis not supported.- The conversion-script should be able to run on windows, but it has never been tested.
python3 merge_nu_files.py main_file.nu
A few steps to understand why it does what:
useworks the same on both files and in-file defined modules- thus
use file.nuis equal tomodule file { FILE_CONTENTS } - PROBLEM:
/can't be included in the name of a in-file module and duplicate names can exist with files. - SOLUTION: randomize the name
- PROBLEM: the names of the modules changed and thus also commands
- SOLUTION:
use abc fileanduse fileboth result infile <command>