Skip to content

Commit

Permalink
chore: update pre-commit hooks (MikePopoloski#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored May 14, 2024
1 parent d982564 commit a372101
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ repos:

# clang-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.4
rev: v18.1.5
hooks:
- id: clang-format
exclude: ^external/.*
9 changes: 6 additions & 3 deletions source/parsing/Parser_expressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,8 @@ NameSyntax& Parser::parseName(bitmask<NameOptions> options) {
usedDot = true;
else if (usedDot && !reportedError) {
reportedError = true;
addDiag(diag::InvalidAccessDotColon, separator.location()) << "::"sv << "."sv;
addDiag(diag::InvalidAccessDotColon, separator.location()) << "::"sv
<< "."sv;
}

if (kind == TokenKind::DoubleColon && name->kind == SyntaxKind::IdentifierName)
Expand All @@ -697,14 +698,16 @@ NameSyntax& Parser::parseName(bitmask<NameOptions> options) {
case SyntaxKind::UnitScope:
case SyntaxKind::LocalScope:
if (kind != TokenKind::DoubleColon) {
addDiag(diag::InvalidAccessDotColon, separator.location()) << "."sv << "::"sv;
addDiag(diag::InvalidAccessDotColon, separator.location()) << "."sv
<< "::"sv;
}
break;
case SyntaxKind::RootScope:
case SyntaxKind::ThisHandle:
case SyntaxKind::SuperHandle:
if (kind != TokenKind::Dot) {
addDiag(diag::InvalidAccessDotColon, separator.location()) << "::"sv << "."sv;
addDiag(diag::InvalidAccessDotColon, separator.location()) << "::"sv
<< "."sv;
}
break;
case SyntaxKind::ConstructorName:
Expand Down

0 comments on commit a372101

Please sign in to comment.