Add missing token to DRC rule parser.

Fixes https://gitlab.com/kicad/code/kicad/issues/9041
This commit is contained in:
Jeff Young 2021-08-27 00:43:11 +01:00
parent cfea39f967
commit 436ad0ede7
4 changed files with 8 additions and 4 deletions

View File

@ -35,4 +35,5 @@ silk_clearance
skew
diff_pair_gap
diff_pair_uncoupled
via_count
via_count
via_diameter

View File

@ -256,7 +256,8 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
"silk_clearance "
"skew "
"track_width "
"via_count ";
"via_count "
"via_diameter";
}
else if( sexprs.top() == "disallow"
|| sexprs.top() == "buried_via"

View File

@ -34,6 +34,7 @@
* skew
* track\_width
* via\_count
* via\_diameter
<br><br>

View File

@ -256,7 +256,7 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
{
msg.Printf( _( "Missing constraint type.| Expected %s." ),
"clearance, hole_clearance, edge_clearance, hole, hole_to_hole, "
"courtyard_clearance, silk_clearance, track_width, annular_width, "
"courtyard_clearance, silk_clearance, track_width, annular_width, via_diameter, "
"disallow, length, skew, via_count, diff_pair_gap or diff_pair_uncoupled" );
reportError( msg );
return;
@ -274,6 +274,7 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
case T_silk_clearance: c.m_Type = SILK_CLEARANCE_CONSTRAINT; break;
case T_track_width: c.m_Type = TRACK_WIDTH_CONSTRAINT; break;
case T_annular_width: c.m_Type = ANNULAR_WIDTH_CONSTRAINT; break;
case T_via_diameter: c.m_Type = VIA_DIAMETER_CONSTRAINT; break;
case T_disallow: c.m_Type = DISALLOW_CONSTRAINT; break;
case T_length: c.m_Type = LENGTH_CONSTRAINT; break;
case T_skew: c.m_Type = SKEW_CONSTRAINT; break;
@ -283,7 +284,7 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
"clearance, hole_clearance, edge_clearance, hole_size, hole_to_hole, "
"courtyard_clearance, silk_clearance, track_width, annular_width, "
"courtyard_clearance, silk_clearance, track_width, annular_width, via_diameter, "
"disallow, length, skew, diff_pair_gap or diff_pair_uncoupled." );
reportError( msg );
}