-
-
Notifications
You must be signed in to change notification settings - Fork 45
Dev #1777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #1777
Conversation
…ds to be supported for Clipper Calling Convention. We now generate the error and remove the error in case of a Clipper Calling Convention method with byref parameters
…nto somevar[1,2]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements several compiler fixes and updates to the Runtime and Visual Studio integration, primarily adding support for the RECORD keyword and fixing various parsing and diagnostic issues in the XSharp compiler.
Key changes:
- Added support for the RECORD keyword as a type definition construct (similar to CLASS/STRUCTURE)
- Changed PSZ conversion operators from IMPLICIT to EXPLICIT for INT, INT64, and DWORD types to prevent unintended implicit conversions
- Fixed parsing issues with type check expressions and pattern matching in various contexts
- Added error suppression for Clipper calling convention methods when passing properties by reference
Reviewed changes
Copilot reviewed 10 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| XsParser.prg | Added RECORD keyword support for defining classes and structures with proper entity kind detection |
| XTokenType.prg | Added RECORD and PP_nullable token types to the enum |
| FormattingRules.txt | Added RECORD/END RECORD formatting rules |
| PSZ.prg | Changed conversion operators to EXPLICIT for numeric types and fixed indentation throughout the file |
| Binder.ValueChecks.cs | Removed trailing whitespace from comments |
| XSharpTreeTransformationCore.cs | Fixed type check expression parsing and added NOT pattern support; fixed indentation |
| XSharp.g4 | Added FoxPro-specific bracketed argument list handling for multi-dimensional array syntax |
| DiagnosticsPass.cs | Added bounds check before accessing node.Arguments array; fixed spacing |
| LocalRewriter_XBase.cs | Fixed spacing around method arguments and operators |
| XSharpListener.cs | Updated auto-generated file path comment |
| XSharpBaseListener.cs | Updated auto-generated file path comment |
| Binder_Invocation.cs | Added logic to suppress ERR_RefProperty errors for Clipper calling convention methods |
| Binder_Expressions.cs | Fixed indentation and spacing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Several compiler fixes and some fixes to the Runtime and VsIntegration