Language record
Lua
Lua is read as the table-shaped language it is: functions, the methods hanging off a table, and the locals a chunk declares all get identities, and `require`, `setmetatable` and constructor calls become edges you can walk — with the module surface named only where the chunk actually names it.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .lua
- Registry names
lua- Recorded symbols
- functions · methods · variables
Relationship types this analyzer constructs
10 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | constructed by this analyzer |
extends | constructed by this analyzer |
implements | ruled absent |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | constructed by this analyzer |
decorates | constructed by this analyzer |
renders | ruled absent |
mixes_in | ruled absent |
part_of | ruled absent |
10 constructed, 4 not constructed. All 4 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- No module symbol is published for the file, so a file-scope declaration's containment edge is sourced from the literal string
global. Ownership otherwise stops at the head of the receiver path:function Buffer.meta.index()files the method underBuffer, becauseBuffer.metais not a name any file publishes, and the full path is kept in metadata instead. - A metatable is a name match, and the payload does not grade it differently.
setmetatable(M, base)publishes anextendsedge to whateverbasenames, while every Lua relationship ships confidence 1.0 — so in the stored row a syntactic fact and a name-only inference are indistinguishable, which is a real cost of the flat confidence model rather than a claim that both are equally certain. - A surface the chunk cannot name is disclosed rather than invented. A table returned from
setmetatable's first argument, the result of a call, a value literal and an anonymous function each land inmetadata.unpublishedSurfacewith a stated reason — "a value is not a name", "an anonymous function has no name" — so what is missing is on the record rather than implied by an absence.
Every line above was written against Lua’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .lua. Everything below is about where those files actually sit in a working repository.
- The idiomatic module shape is a table built in a chunk and returned from it —
local M = {}…return M— sorequire "socket.http"is an import edge and the methods belong to the table that holds them. requireis recorded as an import but the loader's own search path is not evaluated, so a module found throughpackage.pathat run time connects to nothing the index can see.- Game and plugin trees mix Lua with vendored C headers, and framework detection deliberately refuses to fire on a bare identifier — a claimed framework has to come from a qualified head or from a required module name, because an earlier rule named three frameworks for a file that contained neither.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- Which functions does this module define, and which modules does it require?
- Which table do these functions belong to?
- Which surface does this chunk return that the index could not name?
- Which object does this one inherit from through a metatable?
What the analyzer sees in code like this
local M = {} -- bb records: variable M
function M.read(path) -- bb records: method read, owned by M
local handle = io.open(path, "r") -- bb records: a call edge -> open (receiver io in metadata)
return handle:read("*a")
end
setmetatable(M, { __index = base }) -- bb records: an extends edge -> base
return M -- what require() gets from this moduleSymbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Scripting & shell — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Lua, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.