diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 08:31:27 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 08:31:27 +0000 |
| commit | e847e4c53cf21fcb96f7ed7765e305a7ec8e6c19 (patch) | |
| tree | d065b2a3f0243df19e7013f433304d8032f83c7b /lib/Parser/ParserExpression.cc | |
| parent | c372c08dc940db58f1da9cadeb64b4cb3c837704 (diff) | |
feat(classes): parse DELETE destructor methods and DELETE statement
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/Parser/ParserExpression.cc')
| -rw-r--r-- | lib/Parser/ParserExpression.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parser/ParserExpression.cc b/lib/Parser/ParserExpression.cc index 96132aa..ee3e193 100644 --- a/lib/Parser/ParserExpression.cc +++ b/lib/Parser/ParserExpression.cc @@ -109,13 +109,13 @@ bool Parser::ParseDesignatorSuffix(std::vector<DesignatorAccess> &Out) { Out.push_back(std::move(A)); } else if (CurTok == '.') { getNextToken(); - if (CurTok != tok_identifier && CurTok != tok_new) { + if (CurTok != tok_identifier && CurTok != tok_new && CurTok != tok_delete) { fprintf(stderr, "error: Expected field name after '.' at line %d\n", Lex.getLine()); return false; } DesignatorAccess A; A.Kind = AccessKind::Field; - A.FieldName = CurTok == tok_new ? "NEW" : Lex.IdentifierStr; + A.FieldName = CurTok == tok_new ? "NEW" : CurTok == tok_delete ? "DELETE" : Lex.IdentifierStr; Out.push_back(std::move(A)); getNextToken(); } else if (CurTok == '^') { |
