Repository navigation
a dot that ends a line of a lambda block reaches into the next line - #156
Merged
Merged
Conversation
Problem: A dot that ends a line of a lambda block reaches into the next
line.
Solution: Read a word as a member only where the dot before it stands on
its line (Galvarcus).
The lines of a lambda block stay in one statement, so a dot that ended
one line stood right before the first word of the next. The analyzer
read that word as a member: after `:!ctags -R .` a call `Missing()` was
`R.Missing`, a member that resolves to no function, so a call to a
function that does not exist gave no unplaced name, and after `edit .`
a call to a function of the project could leave the function a ghost.
Vim9 allows no space behind the dot of a member, and the end of a line
is one. behind_dot now asks that the dot and the word share a line, for
the member flag and for the type of the receiver. A dot that opens a
line still reaches into the line before it.
The four corpora and the survey report the same as before. A word on
the line below `edit .` is still read as an argument of `edit`, which is
#155.
fixes: #153
related: #140
related: #155
Assisted-by: Claude Opus 5
Signed-off-by: Galvarcus <117151435+Galvarcus@users.noreply.github.com>
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lines of a lambda block stay in one statement, so a dot that ended one line stood right before the first word of the next. The analyzer read that word as a member: after
:!ctags -R .a callMissing()wasR.Missing, a member that resolves to no function, so a call to a function that does not exist gave no unplaced name, and afteredit .a call to a function of the project could leave the function a ghost.Vim9 allows no space behind the dot of a member, and the end of a line is one.
behind_dotnow asks that the dot and the word share a line, for the member flag and for the type of the receiver. A dot that opens a line still reaches into the line before it.fixes: #153
AI assistance
Checklist
tools/checkprintsevery check passedSigned-off-by:trailer is present, which theprepare-commit-msghook adds. A fresh checkout has no hooks,so install them again before the first commit
Tests
a_dot_that_ends_a_line_of_a_lambda_block_reaches_into_nothingintests/vim9_syntax.rsfails onR.Missingwithout the change.a_dot_that_opens_a_line_still_reaches_into_the_line_beforeguards a dot that opens a line.What the analyzer reports
The four corpora and the survey report the same as before.
Documentation
Anything reviewers should know
A word on the line below
edit .in a lambda block is still read as an argument ofedit, which hides a call there. That is #155, which this change does not touch.