Skip to main content

parse_metadata

Function parse_metadata 

Source
pub fn parse_metadata(source: &str) -> ModuleMetadata
Expand description

Parse LDoc-style metadata from a Lua source string.

  1. Parses --- @tag value lines at the TOP of the file (stops at first non---- line).
  2. Auto-extracts function names from function c:method_name( and function M.method_name( patterns across the entire file.

Never panics — returns a valid ModuleMetadata even on empty or malformed input.