aboutsummaryrefslogtreecommitdiff
path: root/lib/Parser/ParserExpression.cc
AgeCommit message (Collapse)Author
2026-10-22fix(parser): parse casts to type names from other source files_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(parser): report missing THEN and ')' on the line that needs them_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(parser): name the unexpected token in expression diagnostics_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share call-argument, result-access and type-token checks_ov4
Add ParseOptionalCallArgs() for member calls and NEW, diagnoseResultAccess() for the duplicated "access on a function result" diagnostic, and isBuiltinTypeToken() for the builtin type keyword list used by template-call lookahead, cast detection and CASE label scanning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share the designator degrade rule for INPUT and expressions_ov4
INPUT targets and identifier expressions now build their legacy VariableExprAST/ArrayAccessExprAST/DesignatorExprAST node through makeDesignator(). INPUT still sets the target line explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share callee-name parsing and make operator out-param optional_ov4
ParseOperatorName() takes an optional int * so callers that ignore the operator token no longer declare a dummy. The identical identifier-or- OPERATOR prologues of assignment, identifier-expression and CALL parsing move into ParseCalleeName(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): remove dead token return, precedence check and includes_ov4
getNextToken() now returns void since no caller reads its result, and GetTokPrecedence() does a single map lookup without the unreachable non-positive precedence check. Unused <cstdio>, <set> and FunctionAST.h includes are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(diagnostics): print source diagnostics in gcc file:line: layout_ov4
Lexer, parser, driver and codegen diagnostics now read "<path>:<line>: error: <message>" instead of "error: <message> at line N in <path>". The path is always printed as given on the command line. Call sites pass the bare message to cps::sourceError/sourceWarning, which carry printf format checking; reportError routes through the same helper. The suite iii harness parses the new layout and matches the reason against the message only. iii/template-class-pack-field passed only because its reason regex matched the case path, so it is now case-insensitive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(parser): parse TEMPLATE declarations, template ids and parameter packs_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(lexer): add C_STRING literal suffix_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(classes): add copy constructors and statement-scoped temporaries_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(operators): add member and unary overloads with explicit calls_ov4
Select member and global candidates together, enforce private access, and reuse argument marshalling. Materialize temporary receivers for chaining and register them for the existing object cleanup mechanism. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17refactor(diag): file-qualified diagnostic locations_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): parse DELETE destructor methods and DELETE statement_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): allocate objects with NEW and rebind named class variables_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): support explicit NEW constructor method calls_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): support ordinary member methods and this references_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(compiler): correct CIE semantics and diagnostic locations_ov4
Use standard WHILE headers and default-public class fields, resolve pseudocode identifiers without case sensitivity, and check signed i64 literal boundaries before conversion. Preserve source locations across recursive emission and function diagnostics. Add 22 regression cases and update compiler examples and documentation. Validated all 69 CTest entries with the original Linux Actions seed and verified the release package's embedded, native and IR output paths.
2026-10-16feat(control-flow): implement ordered CASE OF matching_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(parser): split expression and control flow parsing_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>