Skip to content

Identifier not found errors #256

@samiam95124

Description

@samiam95124

Identifier not found errors

Identifier not found errors, such as for assignment() in statement(), are misleading for identifier types that are not appropriate. This is a consequence of the way searchid() and other functions work. They accept a list of identifier types, such as vars, fixedt, etc. The issue is that if, say, an assignment is made to an inappropriate type like a type, constant or fixed id or similar, it ends up with an "id not found", which is a misleading error.

My idea of a fix is to look at each identifier point use of searchid() and do a better disposition of the error by doing another search on id types that are wrong in context, then give a better error if one of those are found.

Ok, my opinion here

The "search id by class" is one of the weaker methods used in the Pascal-P compiler and comes from the original code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions