API Referencecommonutils
torqueScriptParser Reference
Module defined in `lua/common/utils/torqueScriptParser.lua`. Parses TorqueScript source code into an AST using PEG (Parsing Expression Grammar).
Module defined in lua/common/utils/torqueScriptParser.lua. Parses TorqueScript source code into an AST using PEG (Parsing Expression Grammar).
Exports
Functions
M.parse(s)
Parse a TorqueScript source string into an AST.
- Parameters:
s- string - TorqueScript source code
- Returns: table - Abstract Syntax Tree
Internal Notes
- Uses
lua-luaepnf(Extended PEG Notation Format) library for grammar definition - TorqueScript is BeamNG's legacy scripting language (from Torque3D engine)
- Useful for automated migration/analysis of legacy scripts
simpleHttpServer Reference
Module defined in `lua/common/utils/simpleHttpServer.lua`. Simple HTTP server with static file serving, JSON responses, custom route handlers, and HTML templating.
wsUtils Reference
Module defined in `lua/common/utils/wsUtils.lua`. WebSocket server creation and management utilities using BeamNG's `BNGWebWSServer` API.