Skip to content

Parsing errors with minimal setup #14

@bo3b

Description

@bo3b
  1. I set up a completely fresh VSCode, by deleting my user/.vscode and appdata/Code directories.
  2. I installed, solely the FreePascal Toolkit from marketplace. v1.2.7
  3. I set minimal Settings:
    a. FPCDir: C:\lazarus\fpc\3.2.2
    b. FPCTarget: win32
    c. FPCTargetCPU: i386
    d. Fpctoolkit.lsp.Trace: verbose
  4. Made a new folder as starting location.
  5. In FPC PROJECTS lower left, I choose + to create new project.
  6. Chose Program With Unit template.
  7. In lower left I choose Build Debug. Compiles without errors.

With this starting template, I'm still getting errors that look like parsing errors.

Image

In this example snapshot you can see the error of Identifier Not Found: Enter. Which is part of a the string 'Press Enter to exit...'

I get a lot of different errors of this form, this is just the simplest example. It also misparses the SysUtils and windows units. An example out of SysUtils:

C:\lazarus\fpc\3.2.2\source\rtl\win\sysutils.pp: "identifier not found: HAS_LOCALTIMEZONEOFFSET" @ 19:10;

I think maybe this happens on hover, but am not sure. When I hold Ctrl, I get these all the time. When I F12, it doesn't seem to happen.


Wait, I just figured out the bug: When I hold Ctrl down, then mouse over a given word, it brings up the errors. The hover can pull words out of context like 'Welcome', or 'advancedrecords' and throw an error.

It only seems to happen inside comments and strings. Other live, actual code hover is OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions