Docs: align statement syntax topics with XSharp.g4 parser - #2095
Merged
Merged
Conversation
Updated artifact upload actions to version 7.
Co-authored-by: RobertvanderHulst <14240939+RobertvanderHulst@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
RobertvanderHulst
October 1, 2026 09:00
View session
RobertvanderHulst
marked this pull request as ready for review
October 1, 2026 09:15
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The unrelated runtime change introduces a setter-resolution regression, and several updated syntax topics remain incomplete or ambiguous.
Review effort: Balanced
Findings: 1
Open (5)
Defer setter error until all resolution paths are attempted · New Remove unrelated runtime behavior change from docs-only PR · New Document expression and declaration forms after BEGIN USING · New Document accepted values for the idConvention placeholder · New Require a type after both AS and INHERIT · New
What changed in this PR
Aligns statement syntax documentation with the XSharp parser, but also includes an unrelated runtime behavior change.
Changes:
- Documents optional keywords, terminators, and syntax alternatives.
- Corrects the
END UNCHECKEDexample. - Adds dynamic-property handling to runtime field resolution.
| File | Description |
|---|---|
src/Runtime/XSharp.RT/Functions/CompilerSupport.prg |
Changes field-resolution behavior. |
docs/Help/Topics/command_WITH.xml |
Updates type and terminator syntax. |
docs/Help/Topics/command_RETURN.xml |
Documents RETURN VOID. |
docs/Help/Topics/command_NOP.xml |
Documents optional parentheses. |
docs/Help/Topics/command_IF.xml |
Documents alternative terminators. |
docs/Help/Topics/command_FOREACH.xml |
Adds AWAIT, declarations, and ENDFOR. |
docs/Help/Topics/command_FOR.xml |
Updates declaration and terminator forms. |
docs/Help/Topics/command_ENUM.xml |
Adds INHERIT, attributes, and MEMBER. |
docs/Help/Topics/command_DO_WHILE.xml |
Documents supported terminators. |
docs/Help/Topics/command_DELEGATE.xml |
Adds calling-convention syntax. |
docs/Help/Topics/command_BEGIN-USING.xml |
Adds AWAIT and optional terminator syntax. |
docs/Help/Topics/command_BEGIN-CHECKED.xml |
Corrects the unchecked terminator. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+276
to
+280
| err := Error{EG_NOVAR, nameof(fldName), ErrString(EG_NOVAR) + ": " + fldName} | ||
| err:FuncSym := __function__ | ||
| err:ArgNum := 2 | ||
| err:Args := <OBJECT>{wa, fldName} | ||
| THROW err |
Comment on lines
+118
to
+119
| LOCAL nArea := VoDbGetSelect(wa) AS DWORD | ||
| LOCAL err := NULL as Error |
| <para styleclass="Normal"></para> | ||
| <para styleclass="Heading1">Syntax</para> | ||
| <para styleclass="Code with box">BEGIN USING <text style="font-style:italic;">declaration</text><br/>   <text style="font-style:italic;">statements</text><br/>END USING</para> | ||
| <para styleclass="Code with box">BEGIN USING [AWAIT] <text style="font-style:italic;">declaration</text><br/>   <text style="font-style:italic;">statements</text><br/>END [USING]</para> |
| <para styleclass="Normal"><tab />[([<<text styleclass="Italic">idParam</text>> [AS | REF|OUT|IN <<text styleclass="Italic">idType</text>>] [, ...])] </para> | ||
| <para styleclass="Normal"><tab />[AS <<text styleclass="Italic">idType</text>>]</para> | ||
| <para styleclass="Normal"><tab />[TypeparameterConstraints]</para> | ||
| <para styleclass="Normal"><tab />[<<text styleclass="Italic">idConvention</text>>]</para> |
| <para styleclass="Normal"><tab />[attributes] [Modifiers] </para> | ||
| <para styleclass="Normal"><tab />ENUM <idEnumName> [AS type]   </para> | ||
| <para styleclass="Normal"><tab /><tab />memberName [:= value]</para> | ||
| <para styleclass="Normal"><tab />ENUM <idEnumName> [AS | INHERIT type]   </para> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Updates syntax sections in docs/Help/Topics to match the parser grammar (XSharp.g4).
Changed topics: BEGIN CHECKED (END UNCHECKED), FOR, FOREACH, WITH, BEGIN USING, ENUM, DELEGATE, RETURN, NOP, DO WHILE, IF (optional keywords, alternative terminators such as ENDFOR/ENDIF/ENDDO/ENDWITH, AWAIT, AS/INHERIT, IMPLIED, calling convention, RETURN VOID, NOP()).
Docs-only change; xBase command topics (preprocessor-defined) were not compared.