-
Notifications
You must be signed in to change notification settings - Fork 0
Update NewInstance logic #44
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
Conversation
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 reorganizes the package structure for AST and syntax parse tree classes by moving classes from generators.obj.input to generators.obj.abstractSyntaxTree and from generators.obj.out to generators.obj.syntaxParseTree. The refactoring provides clearer separation between Abstract Syntax Tree (AST) and syntax parse tree components, along with an update to NewInstance logic that replaces DataField usage with Input.
- Move AST-related classes from
inputpackage toabstractSyntaxTreepackage - Move syntax tree classes from
outpackage tosyntaxParseTreepackage - Update NewInstance implementation to use Input instead of DataField
Reviewed Changes
Copilot reviewed 132 out of 132 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Multiple test files | Updated import statements to reflect new package structure |
generators/obj/abstractSyntaxTree/NewInstance.kt |
Changed from using DataField to Input for arguments |
generators/obj/syntaxParseTree/OutNode.kt |
Moved node definitions and added missing import |
generators/obj/syntaxParseTree/OutLeaf.kt |
Moved node definitions to OutNode.kt |
| Multiple implementation files | Updated imports to use new package structure |
| Documentation files | Updated imports in Jupyter notebooks |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| val sub1 = instance.subs[1] as Input | ||
| val sub2 = instance.subs[2] as Input |
Copilot
AI
Aug 24, 2025
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.
The pattern of casting to Input is repeated multiple times. Consider extracting this into a helper function to reduce code duplication, such as fun getInputSub(instance: NewInstance, predicate: (Input) -> Boolean = { true }): Input?.
| val sub1 = instance.subs[1] as Input | |
| val sub2 = instance.subs[2] as Input | |
| val sub1 = getInputSub(instance) { it.name == "arg1" }!! | |
| val sub2 = getInputSub(instance) { it.name == "arg2" }!! |
|
|
||
| class ModifiersList: Container() | ||
|
|
||
| open class DataField( |
Copilot
AI
Aug 24, 2025
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.
The line class ModifiersList: Container() was removed but there's no indication in the diff if this class is used elsewhere. If this class removal is intentional, ensure all references to ModifiersList are also removed from the codebase.
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
No description provided.