Skip to content

Conversation

@RobertvanderHulst
Copy link
Member

Several compiler fixes and some fixes to the Runtime and VsIntegration

Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants