Add syntax check for duplicate 'layer' keyword

This commit is contained in:
Thomas Gambier 2024-05-02 04:51:48 +00:00 committed by Seth Hillbrand
parent a95a3fa5c9
commit 1882445b40
1 changed files with 2 additions and 0 deletions

View File

@ -237,6 +237,8 @@ std::shared_ptr<DRC_RULE> DRC_RULES_PARSER::parseDRC_RULE()
break; break;
case T_layer: case T_layer:
if( rule->m_LayerCondition != LSET::AllLayersMask() )
reportError( _( "'layer' keyword already present." ) );
rule->m_LayerSource = FromUTF8(); rule->m_LayerSource = FromUTF8();
rule->m_LayerCondition = parseLayer(); rule->m_LayerCondition = parseLayer();
break; break;