Skip to content
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

Add sp-forward-hybrid-sexp and sp-backward-hybrid-sexp #843

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fuco1
Copy link
Owner

@Fuco1 Fuco1 commented Jan 19, 2018

This is like moving by lines except it jumps over the "logical lines", that is one statement spread over multiple lines. So in case we have something like

|$credentials = $this->facade->create([
    'email' => '[email protected]',
    'name' => 'Bill',
    'password' => 'QWErty098',
    'projectId' => $this->resourceProvider->getValidProject()->getId(),
    'role' => Security\Roles::AGENT,
    'salescode' => 'TST0002',
], $admin);

normal navigation by sexp would land after $credentials, then over the method chain and finally only at the ( it would jump to the end of the statement. The hybrid sexp recognizes this entire thing as one entity and jumps to the end of the logical line, which is at the semicolon.

Note that this is NOT ALWAYS just "go to semicolon", it would work without semicolon just as fine. Also inside the [...] array the end of hybrid sexp is at the ending ] not at the end of the statement. In other words, it should recognize any statement spread over multiple line which is still one "node" in the AST.

Super cool!

@Fuco1 Fuco1 self-assigned this Jan 19, 2018
@Fuco1 Fuco1 force-pushed the feature/hybrid-navigation branch from 52d0fb3 to 9f070cd Compare February 6, 2018 11:48
@Fuco1 Fuco1 force-pushed the feature/hybrid-navigation branch from 9f070cd to 870590d Compare February 14, 2018 12:18
@Fuco1 Fuco1 force-pushed the feature/hybrid-navigation branch from 870590d to c0572d0 Compare February 21, 2018 11:19
@Fuco1 Fuco1 removed their assignment Mar 25, 2024
@Fuco1 Fuco1 self-assigned this Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant