lua
luapegjs
npm i luapegjs
lua

luapegjs

Lua2JS transpiler with Peg.js and escodegen

by Robo

0.3.3 (see all)License:MITTypeScript:Not Found
npm i luapegjs
Readme

luapegjs

Lua2Js [WIP] . It uses Peg.js to generate Mozilla parser compatible AST which is transformed to JS via escodegen Build Status

Install

NPM

Usage

usage: luapegjs OPTIONS

OPTIONS are:

  -t, --ast

    Print AST to stdout

  -c, --compress

    Minify the JS ouput using uglify-js

  -o FILE, --output FILE

    Print generated JS data to FILE. USE "@2" for stderr and 
    "@1" or "-" for stdout.

To build the parser

make build

Or To build examples

make examples

What has been implemented

  • +, -, *, /, =, >=, <=, !=, >, <
  • local
  • -- comments
  • if else statment
  • while repeat for loops
  • {} array
  • function
  • {x=1} tables

Downloads/wk

11

GitHub Stars

10

LAST COMMIT

8yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.3.3
latest
8yrs ago
No alternatives found
No tutorials found
Add a tutorial