Loading...
Searching...
No Matches
conditional.f90 File Reference

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 (line, filename, line_num, 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 (line, filename, line_num, macros, token)
 Process ifdef – test if a macro is defined.
 
subroutine, public handle_ifndef (line, filename, line_num, macros, token)
 Process ifndef – test if a macro is NOT defined.
 
subroutine, public handle_elif (line, filename, line_num, macros, token)
 Process elif – alternative branch after if/elif Only activates if no previous branch in the group was taken.
 
subroutine, public handle_elifdef (line, filename, line_num, macros, token)
 Process elifdef – test if a macro is defined.
 
subroutine, public handle_elifndef (line, filename, line_num, macros, token)
 Process elifndef – test if a macro is not defined.
 
subroutine, public handle_else (filename, line_num)
 Process else – final fallback branch Activates only if no previous if/elif branch was true.
 
subroutine, public handle_endif (filename, line_num)
 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)