diff --git a/Source/SimpleParser/SimpleParser.pas b/Source/SimpleParser/SimpleParser.pas index d7efd2c..6c8e127 100644 --- a/Source/SimpleParser/SimpleParser.pas +++ b/Source/SimpleParser/SimpleParser.pas @@ -4387,7 +4387,17 @@ procedure TmwSimplePasPar.RecordAlign; procedure TmwSimplePasPar.RecordAlignValue; begin - Expected(ptIntegerConst); + if TokenID = ptRoundOpen then + begin + NextToken; + if TokenID = ptIdentifier then + NextToken + else + Expected(ptIntegerConst); + Expected(ptRoundClose); + end + else + Expected(ptIntegerConst); end; procedure TmwSimplePasPar.RecordFieldConstant; diff --git a/Test/Snippets/recordalignparens.pas b/Test/Snippets/recordalignparens.pas new file mode 100644 index 0000000..7af0153 --- /dev/null +++ b/Test/Snippets/recordalignparens.pas @@ -0,0 +1,19 @@ +unit recordalignparens; + +interface + +const + REC_ALIGN = 16; + +type + TParenAligned = record + Value: Integer; + end align(16); + + TIdentAligned = record + Value: Integer; + end align(REC_ALIGN); + +implementation + +end. \ No newline at end of file