--- a/eric6/Utilities/ModuleParser.py Mon Feb 08 19:31:39 2021 +0100 +++ b/eric6/Utilities/ModuleParser.py Tue Feb 09 08:33:41 2021 +0100 @@ -737,6 +737,23 @@ n = m.name names.append(n) inherit = names + # modify indentation level for conditional defines + if conditionalsstack: + if thisindent > conditionalsstack[-1]: + if not deltaindentcalculated: + deltastack.append(thisindent - conditionalsstack[-1]) + deltaindent = reduce(lambda x, y: x + y, deltastack) + deltaindentcalculated = True + thisindent -= deltaindent + else: + while ( + conditionalsstack and + conditionalsstack[-1] >= thisindent + ): + del conditionalsstack[-1] + if deltastack: + del deltastack[-1] + deltaindentcalculated = False # remember this class cur_class = Class(self.name, class_name, inherit, self.file, lineno)