Skip to content

Commit 4f3193d

Browse files
committed
Disable parsing of base class clauses in C mode
Fixes #572 Signed-off-by: Roberto Raggi <[email protected]>
1 parent 884a3ce commit 4f3193d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/parser/cxx/parser.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8215,6 +8215,8 @@ auto Parser::parse_conversion_function_id(ConversionFunctionIdAST*& yyast)
82158215
}
82168216

82178217
auto Parser::parse_base_clause(ClassSpecifierAST* ast) -> bool {
8218+
if (!is_parsing_cxx()) return false;
8219+
82188220
if (!match(TokenKind::T_COLON, ast->colonLoc)) return false;
82198221

82208222
if (!parse_base_specifier_list(ast)) {

0 commit comments

Comments
 (0)