Skip to content

fix(diagnostics): GROUP is valid as a global PROCEDURE/FUNCTION label - #384

Open
geircodes wants to merge 1 commit into
msarson:version-1.0.1from
geircodes:fix/group-procedure-label-diagnostic
Open

fix(diagnostics): GROUP is valid as a global PROCEDURE/FUNCTION label#384
geircodes wants to merge 1 commit into
msarson:version-1.0.1from
geircodes:fix/group-procedure-label-diagnostic

Conversation

@geircodes

Copy link
Copy Markdown

GROUP is not a reserved word in Clarion, but validateReservedKeywordLabels' STRUCTURE_ONLY set required it to sit inside an enclosing structure (e.g. a CLASS method) to avoid the "cannot be the label of a PROCEDURE or FUNCTION declaration" diagnostic — it never accounted for GROUP being valid as a label at global, non-nested scope too.

Confirmed by compiling and running a top-level, non-nested Group PROCEDURE() (declared in MAP, defined normally, called as Group()) against the real Clarion compiler. Removed GROUP from STRUCTURE_ONLY; its only consumer in this file is this exact PROCEDURE/FUNCTION-label check, so the change is fully isolated.

The other 27 keywords in STRUCTURE_ONLY are unverified for this same global-scope validity and are deliberately left as-is.

GROUP is not a reserved word in Clarion, but validateReservedKeywordLabels'
STRUCTURE_ONLY set required it to sit inside an enclosing structure (e.g. a
CLASS method) to avoid the "cannot be the label of a PROCEDURE or FUNCTION
declaration" diagnostic — it never accounted for GROUP being valid as a
label at global, non-nested scope too.

Confirmed by compiling and running a top-level, non-nested `Group PROCEDURE()`
(declared in MAP, defined normally, called as Group()) against the real
Clarion compiler. Removed GROUP from STRUCTURE_ONLY; its only consumer in
this file is this exact PROCEDURE/FUNCTION-label check, so the change is
fully isolated.

The other 27 keywords in STRUCTURE_ONLY are unverified for this same
global-scope validity and are deliberately left as-is.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant