Skip to content

Ignore Go To Definitions for code inside comments and strings - #162

Open
oisanjaya wants to merge 7 commits into
genericptr:trunkfrom
oisanjaya:ignore_diag_on_comments
Open

Ignore Go To Definitions for code inside comments and strings#162
oisanjaya wants to merge 7 commits into
genericptr:trunkfrom
oisanjaya:ignore_diag_on_comments

Conversation

@oisanjaya

Copy link
Copy Markdown
Contributor

Don't call CodeToolBoss.FindMainDeclaration inside comments and strings.

I believe it also fixes #151

Rio Sanjaya and others added 4 commits September 1, 2026 15:33
Replace the manual comment-checking function with a more robust
GetContextAtPosition procedure that tracks strings and different types
of comments during parsing. This prevents trigger definition lookups
while the cursor is inside strings or comment blocks.
@genericptr

Copy link
Copy Markdown
Owner

This approach feels wrong to me in general. Doesn't code tools know where comments and keywords are? That information but be in there somewhere. Maybe have the LLM search in the code tools source and see if it can find anything.

@oisanjaya

oisanjaya commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Update checking using CodeTools API.

But checks were not successful eventhough i successfully built on my machine and test run without failure

@oisanjaya

oisanjaya commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Do we have minimum/maximum requirement version of fpc?

I develop this PR using fpc 3.3.1 but Action runner for this repo is run on 3.2.2 which fail to build my PR. I thought "Requires Free Pascal Compiler version 3.2.0 and Lazarus trunk sources." in readme was a minimum requirement

  • Found the problem: action runner requires Lazarus 4.0

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.

Check inactive regions searches comments and gives syntax errors.

2 participants