Skip to content

hsiaosiyuan0/jlua

Repository files navigation

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, more

Here is a demo naturally built with jlua and Vue.js, in other words we can use Lua within Single File Component, for example:

<template>
 <div>hi {{ lang }}</div>
</template>

<script lang="lua">
local m = {
 data = function ()
   return {
     lang = "Lua"
   }
 end
}
return m
</script>

here is the source of the demo.

About

Yet another Lua implementation in pure JavaScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published