source-academy/js-slang

[fullJS Integration] Evaluation

salty-flower opened this issue · 0 comments

  1. Runs program through parser to get AST
  2. Do not validate
  3. Transpile ImportDeclaration
  4. Integrate with runInContext
  5. Add new evaluation method that uses eval() instead of new Function()
    • It does not really matter with transpiled program as seen from testing, but I would think fullJS speed will be heavily affected

I believe we can just reuse runInContext way of including builtIns

See https://github.com/source-academy/frontend/projects/10#card-76656478