Skip to content

Commit 3a1b92b

Browse files
committed
feat: implement robust error handling and IDE integration
Add comprehensive error management system with stop-on-error control and enhanced semantic analysis capabilities. - Implement error count synchronization across all compiler phases - Add enhanced source location tracking with line content context - Create warning categorization system with 8 distinct categories - Add configurable error limits (MaxErrors, StopOnFirstError, StrictMode) - Implement immediate error recovery preventing cascading failures - Add sophisticated data flow analysis with variable usage tracking - Implement uninitialized variable detection with assignment validation - Add unused variable detection and performance analysis - Create deprecated feature detection with actionable hints - Expand callback system with OnAnalysis for real-time code insights - Add OnStartup/OnShutdown lifecycle management - Implement structured error reporting with source context - Expand test suite from 22 to 33 comprehensive tests (50% increase) - Add dedicated error handling and warning system validation - Implement performance benchmarking and regression prevention Advances implementation from basic foundation to 35/144 BNF rules (24.3% complete). All 33 tests pass with 100% success rate. Breaking changes: None
1 parent 31e4cc5 commit 3a1b92b

29 files changed

+7301
-5796
lines changed

‎.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ __recovery/
8181
# Boss dependency manager vendor folder https://github.com/HashLoad/boss
8282
modules/
8383
/bin/res/output
84-
/src_prev
84+
/src - Copy
8585
bin/CPascalTests.xml
8686
src/tests/test.pas
8787
!bin/LLVM-C.dll
@@ -90,3 +90,5 @@ changes-diff.cmd
9090
changes.diff
9191
zip_latest_commit.cmd
9292
CPascal-main.zip
93+
/bin/output
94+
bin/view.txt

‎CHANGELOG.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11-
- **feat(compiler): Implement Phase 2 Procedures, Functions & Loop Control** (2025-07-02 – jarroddavis68)
12-
Completes all Phase 2 tasks by adding full support for subroutines and advanced loop control statements.
13-
- Implements functions and procedures with support for value, `var`, and `const` parameters.
14-
- Adds `external` function declarations and all BNF-specified calling conventions (`cdecl`, `stdcall`, `fastcall`, `register`) for C ABI interoperability.
15-
- Adds support for `break` and `continue` statements with contextual validation.
16-
- Fixes memory corruption and dangling pointer bugs by implementing correct ownership semantics for parameter symbols in the symbol table.
17-
- Corrects parser logic for statement separator handling.
18-
- Updates `coverage.pas` with comprehensive tests for all new capabilities.
19-
2011
- **feat(compiler): Finalize core features and align test suites** (2025-07-01 – jarroddavis68)
2112
This major update implements foundational control flow structures, a comprehensive C-compatible type system, and a robust callback architecture. This commit also finalizes the implementation by correcting the lexer for full BNF conformance and aligning the entire test suite with the new type system.
2213
- Implemented if-then-else, while-do, repeat-until, and for-to/downto loops.

‎bin/res/src/coverage.cpas

Lines changed: 0 additions & 167 deletions
This file was deleted.

0 commit comments

Comments
 (0)