Skip to content

added shot circuiting to get text of terminals #7934

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

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

TomerStarkware
Copy link
Collaborator

No description provided.

@TomerStarkware TomerStarkware requested a review from orizi July 8, 2025 13:39
@reviewable-StarkWare
Copy link

This change is Reviewable

@TomerStarkware TomerStarkware force-pushed the tomer/shortcircuit_text branch from 55c82f7 to ceb8ca7 Compare July 8, 2025 13:41
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 10 files at r1, all commit messages.
Reviewable status: 8 of 10 files reviewed, 3 unresolved discussions


-- commits line 2 at r1:

Suggestion:

- ceb8ca7: added shortcut for getting text of terminals

crates/cairo-lang-syntax/src/node/helpers.rs line 155 at r1 (raw file):

        let green_node = self.as_syntax_node().green_node(db);
        let GreenNodeDetails::Node { children, .. } = &green_node.details else {
            unreachable!("Expected a node for PathSegment");

I don't understand the message.
same in the other 2.

Code quote:

            unreachable!("Expected a node for PathSegment");

crates/cairo-lang-syntax-codegen/src/generator.rs line 609 at r1 (raw file):

        body.extend(quote! {
            pub fn $name(&self, db: &dyn SyntaxGroup) -> $kind {
                $kind::from_syntax_node(db, self.node.get_children(db)[$i])

can you separate the children save to another PR?

Code quote:

                $kind::from_syntax_node(db, self.node.get_children(db)[$i])

@TomerStarkware TomerStarkware force-pushed the tomer/shortcircuit_text branch from ceb8ca7 to 3a729d5 Compare July 8, 2025 14:15
Copy link
Collaborator Author

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 8 of 10 files reviewed, 3 unresolved discussions (waiting on @orizi)


crates/cairo-lang-syntax/src/node/helpers.rs line 155 at r1 (raw file):

Previously, orizi wrote…

I don't understand the message.
same in the other 2.

Done.


crates/cairo-lang-syntax-codegen/src/generator.rs line 609 at r1 (raw file):

Previously, orizi wrote…

can you separate the children save to another PR?

I can, but this will remove the benefits of the text shortcut as self.children will be called anyway

Copy link
Collaborator Author

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 8 of 10 files reviewed, 3 unresolved discussions (waiting on @orizi)


-- commits line 2 at r1:
Done.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 10 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@TomerStarkware TomerStarkware force-pushed the tomer/shortcircuit_text branch from 3a729d5 to a32ecad Compare July 9, 2025 08:41
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@TomerStarkware TomerStarkware added this pull request to the merge queue Jul 9, 2025
Merged via the queue into main with commit 8d7b8e9 Jul 9, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants