wiki:LibraryCode

Code methods

  • eval(arg): executes the code object, given the argument (if specified). The argument is placed in the variable 'args' in the scope of the code object.
  • catch(code): executes the code object as in eval. If an exception is thrown, execute the code object specified in code. The tree object that caused the exception is placed in the exception variable.
  • while(condition): runs the code object as long as the code specified in condition evaluates to true. The code object runs at least once before the condition is checked.
  • for(list): runs the code object for each item in list. The current item's key is stored in "key" in the current scope, along with its value in "value".