Skip to content

Commit

Permalink
issue #8933 Return type "unsigned int constexpr" not parsed properly
Browse files Browse the repository at this point in the history
Handle `constexpr` similar to `const`
  • Loading branch information
albert-github committed Dec 3, 2021
1 parent d227628 commit fe6c5d3
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/scanner.l
Expand Up @@ -1085,14 +1085,9 @@ NONLopt [^\n]*
<FindMembers>{B}*"constexpr"{BN}+ {
if (yyextra->insideCpp)
{
yyextra->current->type += " constexpr ";
yyextra->current->spec |= Entry::ConstExpr;
lineCount(yyscanner);
}
else
{
REJECT;
}
REJECT;
}
<FindMembers>{B}*"published"{BN}+ { // UNO IDL published keyword
if (yyextra->insideIDL)
Expand Down Expand Up @@ -2315,6 +2310,18 @@ NONLopt [^\n]*
}
yyextra->current->name= yyextra->current->name.mid(7);
}
else if (yyextra->current->name.left(10)=="cconstexpr ")
{
if (yyextra->current->type.isEmpty())
{
yyextra->current->type="constexpr";
}
else
{
yyextra->current->type+="constexpr ";
}
yyextra->current->name=yyextra->current->name.mid(10);
}
else if (yyextra->current->name.left(6)=="const ")
{
if (yyextra->current->type.isEmpty())
Expand Down

0 comments on commit fe6c5d3

Please sign in to comment.