Order matters in PEGTL grammar.

(Because a flagParam will also match "param", but not the
other way around.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16900
This commit is contained in:
Jeff Young 2024-02-08 14:36:50 +00:00
parent 1a91bb369c
commit b4c361f5cc
1 changed files with 3 additions and 3 deletions

View File

@ -66,13 +66,13 @@ namespace SIM_MODEL_SERIALIZER_GRAMMAR
TAO_PEGTL_ISTRING( "thermal" ), // VDMOS
TAO_PEGTL_ISTRING( "xpart" )> {}; // BSIM1
struct fieldParamValuePair : sor<if_must<param,
struct fieldParamValuePair : sor<flagParam,
if_must<param,
opt<sep>,
one<'='>,
opt<sep>,
sor<quotedString,
unquotedString>>,
flagParam> {};
unquotedString>>> {};
struct fieldParamValuePairs : list<fieldParamValuePair, sep> {};
struct fieldParamValuePairsGrammar : must<opt<sep>,
opt<fieldParamValuePairs>,