siggoscript icon indicating copy to clipboard operation
siggoscript copied to clipboard

break program into statements

Open dherman opened this issue 13 years ago • 0 comments

Compilation strategy:

  • parse with Esprima
  • pre-define all vars on global object as undefined
  • pre-define all functions on global object via Function constructor
  • construct one evalable string for each statement, store in an array
  • pass the array to a function that:
    • eliminates all temporary scratch storage
    • does an indirect eval on each string

dherman avatar Sep 03 '12 01:09 dherman