Hi all
I apologize for abusing the knowledge of the people on this list, but I know they will know the answer. Google does not provide a usable answer.
I am busy writing a toy language and I would like it to be used as both a compiler and "interpreter"
I would like it to compile the source and then run the resulting binary when the source file is called via the shebang and it should just do a normal compile when called with "compile code.src"
argv[0] contains the path to the compiler in both cases, which makes sense.
Is there any way to determine which method was used to call the compiler?
Kind Regards
Paul