lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Apr 7, 2020 at 6:53 AM Xavier Wang wrote:
Is there a way to construct a single source
file, that's both a valid Lua script and also a valid C
source?



#define Lua_and_C  /*

print"Lua code is here"

--[=[*/
#include <stdio.h>

int main()
{
   printf("C code is here");
   return 0;
}

//]=]