Skip to content
 
 

Repository files navigation

tree-sitter-cfxlua

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 })
  • in unpacking (local a, b in t)

Used by the zed-cfxlua Zed extension.

Acknowledgement

Based on tree-sitter-lua by Munif Tanjim. The external scanner was initially based on these repositories:

About

Lua grammar for tree-sitter

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages