A tree-sitter grammar for CfxLua, the CitizenFX (FiveM / RedM) dialect of Lua.
Forked from tree-sitter-lua, adding the cfx syntax enabled in FiveM's Lua build:
- compound assignment (
+=,-=,*=,/=,<<=,>>=,&=,|=,^=) - safe navigation (
a?.b,a?[k],a?:m()) - backtick joaat hash literals (
`WEAPON_PISTOL`) - C-style
/* */block comments - table-init sugar (
{ .field }) inunpacking (local a, b in t)
Used by the zed-cfxlua Zed extension.
Based on tree-sitter-lua by Munif Tanjim. The external scanner was initially based on these repositories: