Skip to content

Commit

Permalink
Removed useless parentheses. "Export" is defined but not used. Not su…
Browse files Browse the repository at this point in the history
…re why.
  • Loading branch information
kaby76 committed Jul 18, 2023
1 parent bc9475f commit 1f365fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cpp/CPP14Lexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ fragment Simpleescapesequence:
| '\\f'
| '\\n'
| '\\r'
| ('\\' ('\r' '\n'? | '\n'))
| '\\' ('\r' '\n'? | '\n')
| '\\t'
| '\\v';

Expand Down Expand Up @@ -382,7 +382,7 @@ fragment Schar:
| Escapesequence
| Universalcharactername;
fragment Rawstring: 'R"' (( '\\' ["()] )|~[\r\n (])*? '(' ~[)]*? ')' (( '\\' ["()]) | ~[\r\n "])*? '"';
fragment Rawstring: 'R"' ( '\\' ["()] |~[\r\n (])*? '(' ~[)]*? ')' ( '\\' ["()] | ~[\r\n "])*? '"';
UserDefinedIntegerLiteral:
DecimalLiteral Udsuffix
Expand Down
13 changes: 5 additions & 8 deletions cpp/CPP14Parser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ unaryOperator: Or | Star | And | Plus | Tilde | Minus | Not;
newExpression_:
Doublecolon? New newPlacement? (
newTypeId
| (LeftParen theTypeId RightParen)
| LeftParen theTypeId RightParen
) newInitializer_?;

newPlacement: LeftParen expressionList RightParen;
Expand Down Expand Up @@ -446,7 +446,7 @@ namespaceAliasDefinition:
qualifiednamespacespecifier: nestedNameSpecifier? namespaceName;

usingDeclaration:
Using ((Typename_? nestedNameSpecifier) | Doublecolon) unqualifiedId Semi;
Using (Typename_? nestedNameSpecifier | Doublecolon) unqualifiedId Semi;

usingDirective:
attributeSpecifierSeq? Using Namespace nestedNameSpecifier? namespaceName Semi;
Expand Down Expand Up @@ -567,11 +567,8 @@ parameterDeclarationList:
parameterDeclaration (Comma parameterDeclaration)*;

parameterDeclaration:
attributeSpecifierSeq? declSpecifierSeq (
(declarator | abstractDeclarator?) (
Assign initializerClause
)?
);
attributeSpecifierSeq? declSpecifierSeq (declarator | abstractDeclarator?) (Assign initializerClause)?
;

functionDefinition:
attributeSpecifierSeq? declSpecifierSeq? declarator virtualSpecifierSeq? functionBody;
Expand Down Expand Up @@ -715,7 +712,7 @@ typeParameter:
(
(Template Less templateparameterList Greater)? Class
| Typename_
) ((Ellipsis? Identifier?) | (Identifier? Assign theTypeId));
) (Ellipsis? Identifier? | Identifier? Assign theTypeId);

simpleTemplateId:
templateName Less templateArgumentList? Greater;
Expand Down

0 comments on commit 1f365fb

Please sign in to comment.