27

JLua: Yet another Lua implementation in JavaScript

 5 years ago
source link: https://www.tuicool.com/articles/eQ7bQnu
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

jlua

Yet another Lua implementation in pure JavaScript. It encapsulates:

  • Frontend infrastructure like Lexer and Parser to generate AST
  • Some subclasses of AstVisitors like YamlVisitor and Codegen generate YAML reflects the AST and bytecode for LuaVM, respectively
  • Particularly, JsCodegen translates Lua to JavaScript for running Lua on JavaScript runtime directly

This a demo and here is the source of it.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK