Skip to content

a dot that ends a line of a lambda block reaches into the next line - #156

Merged
Galvarcus merged 1 commit into
Developmentfrom
153-dot-line-end
Nov 15, 2026
Merged

Galvarcus merged 1 commit into
Developmentfrom
153-dot-line-end

Conversation

@Galvarcus

Copy link
Copy Markdown
Owner

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.

fixes: #153

AI assistance

  • AI involvement is disclosed in the commit message

Checklist

  • The commit message follows the Problem and Solution form above
  • tools/check prints every check passed
  • The Signed-off-by: trailer is present, which the
    prepare-commit-msg hook adds. A fresh checkout has no hooks,
    so install them again before the first commit

Tests

  • Tests were added, and each was watched failing first

a_dot_that_ends_a_line_of_a_lambda_block_reaches_into_nothing in tests/vim9_syntax.rs fails on R.Missing without the change. a_dot_that_opens_a_line_still_reaches_into_the_line_before guards a dot that opens a line.

What the analyzer reports

  • No finding moves, and every parity fixture matches

The four corpora and the survey report the same as before.

Documentation

  • No documentation update is needed

Anything reviewers should know

A word on the line below edit . in a lambda block is still read as an argument of edit, which hides a call there. That is #155, which this change does not touch.

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>
@Galvarcus Galvarcus self-assigned this Nov 15, 2026
@github-actions github-actions Bot added the analyzer Changes the Rust analyzer, the fixtures, or the tools that build them label Nov 15, 2026
@Galvarcus
Galvarcus merged commit 2a0a7aa into Development Nov 15, 2026
9 checks passed
@Galvarcus
Galvarcus deleted the 153-dot-line-end branch November 15, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analyzer Changes the Rust analyzer, the fixtures, or the tools that build them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant