Skip to main content

Module elixir

Module elixir 

Source
Expand description

Elixir: keyword Call identity (def, defmodule, quote, …).

Functions§

elixir_call_keyword
Reads the text of the target field of an Elixir Call node.
elixir_do_block_call_children
Iterates the direct-child Call nodes inside the do_block of an Elixir Call (typically a defmodule). Used by Npm / Npa to scan a module body for method-defining macros / defstruct without descending into nested modules. Yields no items when the Call has no do_block.
elixir_is_class_macro
Class-defining macro (defmodule). Paired with elixir_is_method_macro where a caller needs both (“any space-opening declaration”).
elixir_is_inside_quote_block
Returns true when node is lexically nested inside the do_block of a quote do … end Call (Elixir’s metaprogramming template). A def / defp / defmacro / defmacrop inside quote does not define a method of any enclosing module — the syntax tree is a code template emitted later, when the surrounding macro is invoked. Treating those quoted Calls as methods inflates Wmc and disagrees with Npm’s direct-children classification (#310).
elixir_is_method_macro
Method-defining macros (def, defp, defmacro, defmacrop). The set is duplicated across checker, getter, and several metric impls because each consults it from a different trait surface; centralising the literal here keeps future additions (e.g. defguard) consistent.