API Referencecommonutils
TorqueScript Parser
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
See Also
- utils/ - Utility Modules - Directory overview
- calltracer Reference - Related reference
- dateUtils Reference - Related reference
- debugDraw Reference - Related reference
- Common Libraries Overview - Guide
HTTP Server
Module defined in `lua/common/utils/simpleHttpServer.lua`. Simple HTTP server with static file serving, JSON responses, custom route handlers, and HTML templating.
WebSocket Server
Module defined in `lua/common/utils/wsUtils.lua`. WebSocket server creation and management utilities using BeamNG's `BNGWebWSServer` API.