RetroForth/nga requires source files to be in unu format (http://unu.retroforth.org). Should I add support for plain, non-unu source files?
includethat works with non-unu sources?
I've seen a few folks get tripped up by Unu, so I think this is a good idea. You could possibly use a
--plainflag. I think it would be important to have a unified
includeword that can mix Unu and non-Unu source files.
Thinking about it more, it would seem that having an "Unu-aware" include word might mandate a known file extension. If that's the case, maybe there is no need for a special flag (the Unu-ness of a source file would be inferred from the file extension).
Arland suggests having the
includefunctionality scan the files for ~~~ and/or ``` blocks rather than using a specific file extension (or set thereof).
That's another option.
Some possible hiccups that would need to be considered:
- performance when loading large files.
- Accidental false positives in applications that do funny things with text input parsing and have stray
~~~chars in unexpected places.
Another option I hadn't considered could be to have some sort of pragma comment that is always on the first line of a non-unu source..