Skip to content
Yet another Lua implementation in pure JavaScript.
Branch: master
Clone or download
Latest commit 2872d1b Jun 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src refactor Source::read May 25, 2019
test updates for interact with js May 21, 2019
.babelrc support oop May 21, 2019
.editorconfig parser Apr 17, 2019
.gitignore support oop May 21, 2019
.npmignore parser Apr 17, 2019
.prettierrc parser Apr 17, 2019
LICENSE parser Apr 17, 2019
README.md Update README.md Jun 5, 2019
jest.config.json parser Apr 17, 2019
package-lock.json update readme May 26, 2019
package.json update readme May 26, 2019
webpack.config.js parser Apr 17, 2019

README.md

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.

You can’t perform that action at this time.