Skip to content

Parse errors say "column xxx", but the number reported is the position within the file, not within the line #89

Description

@richardfearn

ply only tracks the position of tokens in the whole file (lexpos), but this is used incorrectly as a column number in the errors reported by pyhcl.

See this in the ply documentation:

https://github.com/dabeaz/ply/blob/master/doc/ply.md#line-numbers-and-positional-information

It should be possible to calculate the actual column number using lexpos.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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