Skip to content

Add Lua parser support (.lua) #136

@josephismikhail

Description

@josephismikhail

Problem

Ix does not currently parse .lua files. Lua scripts are treated as unrecognized and excluded from analysis, meaning scripting logic, configuration, and embedded application code written in Lua are invisible to the system.

Proposed solution

Add a Lua parser that can identify and extract:

  • Function definitions (local and global)
  • Variable declarations (local and global)
  • Module patterns (e.g. require, return {})
  • Table definitions and field access
  • Control flow (e.g. if, for, while, repeat)
  • Metatables and metamethods

Support the following file patterns: *.lua

Why it matters

Lua is widely used as an embedded scripting language in game engines (Roblox, Love2D, Unity via MoonSharp), application plugins (Neovim, Redis, Nginx/OpenResty), and configuration systems. Without parsing Lua, Ix cannot reason about scripting logic or how Lua integrates with the host environment it extends.

Merge requirements

Before this can be merged to main, the following must pass:

  • Tested on 3 repos
  • No regressions on existing parsers (ix map on a known TS/JS repo, verify counts unchanged)
  • Unit + smoke tests pass (npm test in ix-cli)
  • Local and global function definitions ingested as entities
  • Local and global variable declarations ingested
  • require() calls resolved as import entities
  • Table definitions ingested and fields visible as members
  • Metatables and metamethods ingested and linked to their table
  • Module return pattern (return {}) recognized and linked to file
  • CONTAINS chains correctly: file → table → field/method
  • ix text returns results with language: lua
  • ix contains returns members for a known Lua table or module

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions