Noir::LuaCalleeExtractor
Inherits Noir::CalleeExtractorBase
Constants
MoonScript-only keywords. These are NOT Lua keywords — class,
import, from, with, switch, … are all legal (and common,
e.g. middleclass's class("Foo")) Lua function names — so they are
filtered ONLY when the source file is .moon, where import X from,
class … extends …, and switch/when are statement keywords that
would otherwise surface as phantom callees.
A receiver chain is a.b, a:b (Lua method call), or a\b
(MoonScript method call). The : separator is kept space-free so a
MoonScript table entry (success: Flow(...), where : is a hash
separator, not method access) is not glued onto the following call —
Lua's obj:method never carries surrounding whitespace, whereas a
MoonScript key always does. . and \ keep optional whitespace.
Instance methods
Public String overload kept for callers outside this module.
Public String overload kept for callers outside this module.
Extract a MoonScript class-action value: everything from value_start
(just past a route header's :) through the end of the indentation
block the header introduces. This keeps the header line's trailing
content (respond_to {, a wrapper
call, an inline arrow) together with every more-indented line that
follows, so respond_to blocks and wrapped handlers are captured
whole. start_line is the header line, matching the offsets callers
already expect for inline arrows.
Public String overload kept for callers outside this module.
Blank out comments and long-bracket ([[ ]]/[=[ ]=]) string bodies but
PRESERVE short-string contents verbatim. Route analyzers need the path
literals (app:get("/login", …)) intact while still suppressing --
comments and here-strings that would otherwise leak phantom routes.
Newlines are kept so line-anchored scans and line numbering stay aligned.
Public String overload kept for callers outside this module.