Expand description
§full-moon <-miniserde-> luaparse.js
This is a silly library I wrote to bridge the gap between some software I had written previously that worked with the JSON output from luaparse.js and the full_moon lua parsing library that I chose.
It offers a range of wrapper types around the types from full-moon and
implements the miniserde::Serialize trait from miniserde on them. Use the
Chunk::wrap(ast) method on some Ast from full-moon to get started.
You can then use miniserde::json::to_string(x) on any x that implements
miniserde::Serialize, such as the Chunk mentioned above.
Note: This library includes some code that works around issues such as missing
operator precendence in full-moon. The upstream author is currently reworking
the parser so there was no point in trying to fork the current API.
Modules§
Structs§
- Body
- Call
Expression - Chunk
- Else
Clause - Elseif
Clause - Expr
- Expr
List - Express
- Function
Identifier Names - Function
Parameters - Identifier
- IfClause
- IfClauses
- Last
Statement - Member
Expr - Name
List - Null
- Param
- Statement
- Table
Cons Field - Table
Constructor Expr - Table
Constructor Fields - Token
- Val
- VarExpr
- VarList
- Variable