From 1882445b40e7065b728f5bb7a96ec92efa03b9ef Mon Sep 17 00:00:00 2001 From: Thomas Gambier Date: Thu, 2 May 2024 04:51:48 +0000 Subject: [PATCH] Add syntax check for duplicate 'layer' keyword --- pcbnew/drc/drc_rule_parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/drc/drc_rule_parser.cpp b/pcbnew/drc/drc_rule_parser.cpp index 76a2ddab59..601c79f271 100644 --- a/pcbnew/drc/drc_rule_parser.cpp +++ b/pcbnew/drc/drc_rule_parser.cpp @@ -237,6 +237,8 @@ std::shared_ptr DRC_RULES_PARSER::parseDRC_RULE() break; case T_layer: + if( rule->m_LayerCondition != LSET::AllLayersMask() ) + reportError( _( "'layer' keyword already present." ) ); rule->m_LayerSource = FromUTF8(); rule->m_LayerCondition = parseLayer(); break;