Add support for uuid and interfaces deriving from each other#48
Add support for uuid and interfaces deriving from each other#48asklar merged 1 commit intoasklar:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for UUID attributes and interface inheritance in IDL files. The changes enable interfaces to inherit from other interfaces (like IInspectable) and allow UUID attributes to be specified on interfaces.
- Added support for interface inheritance syntax using extends clause
- Added
uuidandcontractversionto the list of supported attributes - Updated VS Code settings for ESLint configuration
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| server/src/test/assets/interfaces.idl | Adds test case for interface with UUID attribute and inheritance from IInspectable |
| server/src/server.ts | Adds uuid and contractversion to completion suggestions |
| server/src/midl.pegjs | Updates grammar to support optional extends clause in interface declarations |
| .vscode/settings.json | Updates ESLint setting from boolean to explicit string value |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| /* INTERFACE DECL */ | ||
| ifaceDecl = _ "interface" _ interfaceName _ ((requires? _ openBrace _ ifaceMember* _ closeBrace) / ";") | ||
| ifaceDecl = _ "interface" _ interfaceName _ ((extends? _ requires? _ openBrace _ ifaceMember* _ closeBrace) / ";") |
There was a problem hiding this comment.
The grammar rule is missing the definition for the extends clause. You've added extends? to the interface declaration but there's no corresponding rule defining what extends should match. This will likely cause parsing errors when encountering interface inheritance syntax.
There was a problem hiding this comment.
It's right up there on line 111. Are you sure?
While it's not super common, people do say
interface IFoo : IInspectableat times.And they like to specify the
[uuid()]on interfaces too.