lua-users home
lua-l archive

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


2010/7/2 Valerio Schiavoni <valerio.schiavoni@gmail.com>:
> Hello everyone,
>
> consider the case where you *must* merge several Lua files and then
> execute the merged one.
> Which are the things to take care of? I've a couple of things in mind
> which I don't know how to solve:
>
> - name conflicts: files could have declared global variables with the
> same name; would it be enough to
>  make a re-write by for example prepending their name with the name
> of the file they are declared?
>
> - stack-trace line-numbers: if the merged file crashes, the
> stack-trace produces line-numbers of complete
>  non-sense to the developers of the original files...
>
>
> Do you have suggestions?

Why do you need to merge the files ? What about conflicts between
globals and locals (ie. the top file define a local foo, while the
bottom file assumed it was a global) ?