Daniel Heck wrote:
>>As for the XML debate... what good will XML bring, anyway? How will
>>reading it be simpler than just letting the (LUA) script run and setup
>>editor state programatically? (Presumably with functions like
>>add_filter, add_shape, etc.)
> 
> 
> Lua scripts are only parsable by the Lua interpreter, so every level
> editor in existence has problems loading levels that aren't restricted
> to the most basic syntactic constructs.  Just as importantly, even *if*
> you include the Lua interpreter, you cannot restore the Lua file after
> loading it, mostly because it's not possible to recover the source code
> of functions after they have been loaded.

The LUA format would be designed for machine usage. You couldn't
complain that it doesn't recreate the file faithfully on save, because
it would be designed for machine to read from and for machine to write
to. There won't be anything like loops and functions. Just calls to
Editor.whatever functions.

> 
> The lua2xml script currently chokes on all levels that use Lua functions
> as signal targets, for exactly that reason.  It *might* be possible to
> convert some of these levels by manually parsing them, copying all
> variable assignments and function definitions verbatim to the <lua>
> section, emitting a warning that the level may not work correctly and
> hoping for the best :-)  I'm only glad you cannot use anonymous
> functions as signal targets in Enigma ;-)
> 
> Daniel
Petr


_______________________________________________
Enigma-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/enigma-devel

Reply via email to