Skip to content

WI #2520 Check variables used in EVALUATE / WHEN#2834

Merged
efr15 merged 10 commits intodevelopfrom
2520-parser-does-not-check-conditions_2
Mar 5, 2026
Merged

WI #2520 Check variables used in EVALUATE / WHEN#2834
efr15 merged 10 commits intodevelopfrom
2520-parser-does-not-check-conditions_2

Conversation

@efr15
Copy link
Copy Markdown
Contributor

@efr15 efr15 commented Feb 16, 2026

Fixes #2520

@efr15 efr15 requested review from Finou1404 and fm-117 February 16, 2026 14:22
@efr15 efr15 self-assigned this Feb 16, 2026
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol.Test/Parser/Programs/Cobol85/EvaluateWhenCompatibility.PGM.txt Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
Finou1404
Finou1404 previously approved these changes Feb 18, 2026
@efr15 efr15 requested a review from fm-117 February 18, 2026 17:34
Copy link
Copy Markdown
Contributor

@fm-117 fm-117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should simplify the grammar using a single definition for WHEN code elements whether they appear in EVALUATE or SEARCH.

  • this should avoid odd cases where alphanumeric comparison variables/expressions are wrapped as BooleanComparisonVariable

We should also improve the checks performed on ConditionalExpression as we'll have multiple visits

Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs
@fm-117 fm-117 self-requested a review February 20, 2026 13:36
Comment thread TypeCobol/Compiler/Diagnostics/CrossChecker.cs Outdated
@efr15 efr15 requested a review from fm-117 February 23, 2026 14:01
fm-117
fm-117 previously approved these changes Feb 23, 2026
* WI #2520 Check USAGE compatibility between EVALUATE and WHEN

* WI #2520 Improve code

* WI #2520 Fix test program

* WI #2520 Fix test program (2)

* WI #2520 Code review

* WI #2520 Code review (2)

* WI #2520 Code review (3)

* WI #2520 Code review (4)

---------

Co-authored-by: efr15 <efr15@github.com>
@efr15 efr15 merged commit c29ca7e into develop Mar 5, 2026
8 checks passed
@efr15 efr15 deleted the 2520-parser-does-not-check-conditions_2 branch March 5, 2026 08:30
@efr15 efr15 mentioned this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parser does not check conditions

3 participants