|
| type(macro) function | macro_new (name, val) |
| | Construct a new macro object.
|
| |
| subroutine | set_default (this, name) |
| | Set macro name only (used internally)
|
| |
| subroutine | set_with_value (this, name, value) |
| | Set both name and replacement value (used internally)
|
| |
| character(:) function, allocatable, public | expand_all (line, macros, filepath, iline, stitch) |
| | Fully expand a line including predefined macros (FILE, LINE, etc.) First performs normal macro expansion via expand_macros(), then substitutes standard predefined tokens with current file/line/date information.
|
| |
| character(:) function, allocatable, public | expand_macros (line, macros, stitch) |
| | Core recursive macro expander (handles function-like, variadic, #, ##)
|
| |
| logical function | is_circular (macros, idx) |
| | Detect whether expanding macro at index idx would cause a cycle Builds a dependency graph from macro replacement texts and checks for circular paths. Used during expansion to avoid infinite recursion.
|
| |
| logical function, public | is_defined (name, macros, idx) |
| | Check if a macro with given name exists in table.
|
| |
| character(:) function, allocatable | tostring (any) |
| | Generic conversion of polymorphic value to string Used internally during macro argument stringification and debugging. Supports integers, reals, logicals, characters, and complex.
|
| |
| subroutine | add_to (vec, val, n, chunk_size, finished) |
| | Internal helper: grow dynamic macro array in chunks for efficiency Adds a new macro to the allocatable array, growing in BUFFER_SIZE increments. Also detects direct self-references (A → A) and marks both sides as cyclic.
|
| |
| subroutine | add_item (this, arg) |
| | Add a complete macro object to the table.
|
| |
| subroutine | add_item_from_name (this, name) |
| | Add macro by name only (value = empty)
|
| |
| subroutine | add_item_from_name_and_value (this, name, value) |
| | Add macro with name and replacement text.
|
| |
| subroutine | add_range (this, args) |
| | Add multiple macros at once.
|
| |
| subroutine | clear_item (this) |
| | Remove all macros from table.
|
| |
| type(macro) function, allocatable | get_item (this, key) |
| | Retrieve macro by 1-based index.
|
| |
| subroutine | insert_item (this, i, arg) |
| | Insert macro at specific position.
|
| |
| integer function | size_item (this) |
| | Return number of defined macros.
|
| |
| subroutine | remove_item (this, i) |
| | Remove macro at given index.
|
| |