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' => 'bill@salescompany.xy',
    '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 removed their assignment Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

None yet

1 participant