Loading...
Searching...
No Matches
conditional.f90

Go to the source code of this file.

Data Types

type  cond_state
 State of a single conditional block. More...

Functions/Subroutines

logical function, public is_active ()
 Determine if current line is inside an active conditional block.
subroutine, public handle_if (ctx, macros, token)
 Process a if directive with constant expression evaluation Evaluates the expression after if using evaluate_expression() and pushes a new state onto the conditional stack.
subroutine, public handle_ifdef (ctx, macros, token)
 Process ifdef – test if a macro is defined.
subroutine, public handle_ifndef (ctx, macros, token)
 Process ifndef – test if a macro is NOT defined.
subroutine, public handle_elif (ctx, macros, token)
 Process elif – alternative branch after if/elif Only activates if no previous branch in the group was taken.
subroutine, public handle_elifdef (ctx, macros, token)
 Process elifdef – test if a macro is defined.
subroutine, public handle_elifndef (ctx, macros, token)
 Process elifndef – test if a macro is not defined.
subroutine, public handle_else (ctx)
 Process else – final fallback branch Activates only if no previous if/elif branch was true.
subroutine, public handle_endif (ctx)
 Process endif – end of conditional block Pops the top state from the stack. Reports error on unmatched endif.

Variables

type(cond_state), dimension(max_cond_depth), public cond_stack
 Global stack of conditional states (depth-limited).
integer, public cond_depth = 0
 Current nesting depth of conditional directives (0 = outside any if).