luaparse
JSON →luaparse is a JavaScript-based Lua parser that generates an Abstract Syntax Tree (AST) from Lua source code. Originally developed by Oskar Schöldström for his bachelor's thesis, it supports various Lua versions including '5.1', '5.2', '5.3', and 'LuaJIT'. The current stable version is 0.3.1, primarily a maintenance release addressing issues from 0.3.0. The library offers flexible parsing options, allowing control over comment storage, scope tracking, location and range information, and custom node/scope creation callbacks. It can be used in CommonJS environments, AMD, and directly in browsers via a global `luaparse` object. A key differentiator is its detailed configuration for handling different Lua versions and its comprehensive AST output, including specific options for character encoding interpretation due to the difference between JavaScript's Unicode strings and Lua's bytestrings.
Traffic · last 30 days ↑33% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇺🇦 Ukraine · 🇩🇪 Germany