Skip to content

Commit

Permalink
Fix up C++20 module pseudo-keyword masking variables/members
Browse files Browse the repository at this point in the history
  • Loading branch information
jevinskie committed Apr 2, 2024
1 parent 19436e4 commit 60391cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/code.l
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
}
<Body>"module"/{B}*[:;]? { // 'module X' or 'module : private' or 'module;'
if (yyextra->lang!=SrcLangExt::Cpp) REJECT;
if (!yyextra->type.isEmpty() || !yyextra->name.isEmpty()) REJECT;
startFontClass(yyscanner,"keyword");
codifyLines(yyscanner,yytext);
endFontClass(yyscanner);
Expand Down
1 change: 1 addition & 0 deletions src/scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ NONLopt [^\n]*
}
<FindMembers>{B}*"module"{BN}*";" { // global module section
if (!yyextra->insideCpp) REJECT;
if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
//printf("Implementation module unit\n");
lineCount(yyscanner);
BEGIN( FindMembers );
Expand Down

0 comments on commit 60391cb

Please sign in to comment.