Improving Nasal: Difference between revisions

Jump to navigation Jump to search
m
m (→‎Consider Opcode reordering: no need for it to be a function, it's static and can be a prepopulated hash - if it is to be a function, the hash should be pre-created in initGlobals and just returned)
Line 70: Line 70:
Besides making a full IDE (which would be ''really'' cool), there are several things that can be done by editing the source code of Nasal to enhance debugging support and increase development :
Besides making a full IDE (which would be ''really'' cool), there are several things that can be done by editing the source code of Nasal to enhance debugging support and increase development :


* Being able to dump the global namespace (see [http://flightgear.org/forums/viewtopic.php?f=30&t=19049&p=182930&#p182930 this topic] for a possible solution) or at least dump things prettily (an unreleased version of the file discussed in [[Nasal Meta-Programming]] has good support for nice formatting).
* Being able to dump the global namespace (see [http://flightgear.org/forums/viewtopic.php?f=30&t=19049&p=182930&#p182930 this topic] for a possible solution) or at least dump things prettily (an unreleased version of the file discussed in [[Nasal Meta-Programming]] has good support for nice formatting). This should probably be  lazy API that can dump an arbitrary namespace recursively - using the canvas, we could then map that to a TreeView


* Register a callback for handling errors using call() (for parser errors it will need the AST, for runtime errors it would need bytecode access)
* Register a callback for handling errors using call() (for parser errors it will need the AST, for runtime errors it would need bytecode access)

Navigation menu