Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Churkin committed Jul 11, 2024
1 parent dfce622 commit b16cdc5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions source/parsing/Parser_members.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3223,13 +3223,10 @@ SpecparamDeclaratorSyntax& Parser::parseSpecparamDeclarator(SyntaxKind parentKin
closeParen = expect(TokenKind::CloseParenthesis);

if (!name.isMissing()) {
if (isPathPulse) {
if (parentKind != SyntaxKind::SpecifyBlock)
addDiag(diag::PulseControlSpecifyParent, name.range());
else if (!expr2)
expr2 = &expr1;
}
else if (expr2) {
if (isPathPulse && parentKind != SyntaxKind::SpecifyBlock)
addDiag(diag::PulseControlSpecifyParent, name.range());

if (!isPathPulse && expr2) {
auto last = expr2->getLastToken();
SourceRange range(expr1.getFirstToken().location(),
last.location() + last.rawText().length());
Expand Down

0 comments on commit b16cdc5

Please sign in to comment.