-
Notifications
You must be signed in to change notification settings - Fork 326
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
Collapsing nodes #8686
Collapsing nodes #8686
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.
Nothing really serious found by me.
app/gui2/src/util/ast/abstract.ts
Outdated
exprs_.push({ newline: { node: Token.new('\n') }, expression: null }) | ||
} | ||
const body = BodyBlock.new(exprs_, module) | ||
const args_ = args.map((arg) => [{ node: arg.exprId }]) |
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.
When constructing an Ast object it's important to ensure any children are accessible in the object's module. After #8711 the makeChild
helper takes care of this; it can be used like: node: makeChild(module, arg, id)
. id
should be the ID of the object currently being constructed; it can be generated with newAstId()
and used here and as the ID argument to the Function
constructor call below.
Pull Request Description
Closes #8067
Also fixes
nodeRects
map, as it no longer stores invlisible nodes.collapsing.nodes.mp4
Important Notes
Positioning of newly created nodes is not handled yet, as it requires fixes in the Ast editing API.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.